New submission from Марк Коренберг <socketp...@gmail.com>:

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.

----------
assignee: docs@python
components: Documentation
messages: 369544
nosy: docs@python, socketpair
priority: normal
severity: normal
status: open
title: PEP0435 (enums) -- there is no standard on enum item letters case
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40721>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to