[New-bugs-announce] [issue19331] Revise PEP 8 recommendation for class names

Barry A. Warsaw report at bugs.python.org
Mon Oct 21 16:01:48 CEST 2013


New submission from Barry A. Warsaw:

PEP 8 says:

"""
Class Names
Almost without exception, class names use the CapWords convention. Classes for internal use have a leading underscore in addition.
"""

yet there are some notable exceptions in practice, such as classes designed to be context managers (used with the `with` statement).

This message indicates Nick's implementation choice of a wrapper function in part to avoid naming a class with all lower cases (which look better with `with`, but break the PEP 8 convention).

https://mail.python.org/pipermail/python-dev/2013-October/129791.html

The PEP 8 language should be revised, but striking the right balance might be a little tricky.

----------
messages: 200783
nosy: barry
priority: normal
severity: normal
status: open
title: Revise PEP 8 recommendation for class names

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19331>
_______________________________________


More information about the New-bugs-announce mailing list