[issue19331] Revise PEP 8 recommendation for class names
Paul Moore
report at bugs.python.org
Mon Oct 21 16:18:30 CEST 2013
Paul Moore added the comment:
How about simply adding a further sentence, something like:
"Where a class is being used conceptually as a callable (for example, context managers), the naming convention for callables (lower_case_with_underscores) should be followed."
Maybe also add a section at the start of "Naming Conventions":
"""
Overriding Principle
Whenever names are visible to the user, as public parts of the API, the naming convention should reflect usage rather than implementation. An internal change (for example switching from a class to a factory function) should never affect the names used in the public API.
"""
----------
nosy: +pmoore
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19331>
_______________________________________
More information about the Python-bugs-list
mailing list