Dennis Sweeney <[email protected]> added the comment:
I'm personally -0 for underscores -- they might slightly improve readability of
the function name in isolation but may also add confusion about which methods
have underscores. Only one out of the 45 non-dunder str methods has an
underscore right now:
>>> meths = [x for x in dir(str) if not x.startswith('__')]
>>> [x for x in meths if '_' in x]
['format_map']
>>> [x for x in meths if '_' not in x]
['capitalize', 'casefold', 'center', 'count', 'encode', 'endswith',
'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isascii',
'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable',
'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip',
'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition',
'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase',
'title', 'translate', 'upper', 'zfill']
Maybe I'm wrong, but it seemed to me that most of the discussions to date had
arrived at leaving out underscores. Is there a process or appropriate channel
to continue this discussion now that the PEP is accepted?
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39939>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com