Message369544
Example from PEP0435:
(https://www.python.org/dev/peps/pep-0435)
>>> from enum import Enum
>>> class Color(Enum):
... red = 1
... green = 2
... blue = 3
Example from Python documentation:
(https://docs.python.org/3/library/enum.html)
>>> from enum import Enum
>>> class Color(Enum):
... RED = 1
... GREEN = 2
... BLUE = 3
...
So, what are the rules for naming enum members?
CamelCase ? snake_case ? ALL_CAPS ?
Someone should explain how should we format sources. So various linters may check for that. |
|
Date |
User |
Action |
Args |
2020-05-21 21:42:56 | socketpair | set | recipients:
+ socketpair, docs@python |
2020-05-21 21:42:56 | socketpair | set | messageid: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> |
2020-05-21 21:42:56 | socketpair | link | issue40721 messages |
2020-05-21 21:42:56 | socketpair | create | |
|