[Python-ideas] [PEP8] Predicate consistency

Barry Warsaw barry at python.org
Fri Feb 6 01:12:23 CET 2015


On Feb 05, 2015, at 11:36 PM, Marco Buttu wrote:

>Hi all, the PEP 8 says that function and method names should be lowercase,
>with words separated by underscores as necessary to improve
>readability. Maybe it could be a good idea to specify in the PEP8 that the
>predicates should not be separated by underscores, because it is pretty
>annoying to see this kind of inconsistency:
>
>     str.isdigit()
>     float.is_integer()

I don't think PEP 8 should change.  Even words in predicates should be
separated by an underscore.  But it's not worth it to go back and change old
APIs that have been in existence forever.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150205/f43565f2/attachment.sig>


More information about the Python-ideas mailing list