The range documentation is not PEP-8 compatible: >>> range.__doc__.splitlines()[-1] 'Returns a virtual sequence of numbers from start to stop by step.' >>> range.__reversed__.__doc__ 'Returns a reverse iterator.' >>> range.index.__doc__.splitlines()[-1] 'Raises ValueError if the value is not present.' They should have been 'Return...' and 'Raise...'. Patch is attached
PEP8 just says "PEP 257 describes good docstring conventions." PEP 257 is what says '''It [the one line docstring] prescribes the function or method's effect as a command ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...". ''' I strongly prefer the rule, but we do not usually patch purely for PEP8 compliance. However, a docstring patch is safer than a code patch.