This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author remi.lapeyre
Recipients docs@python, remi.lapeyre, socketpair
Date 2020-05-21.21:50:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590097803.31.0.658958501555.issue40721@roundup.psfhosted.org>
In-reply-to
Content
There is no official way, you can find both in the Python tree: all caps at https://github.com/python/cpython/blob/master/Lib/ast.py#L615-L636 and snake case at https://github.com/python/cpython/blob/master/Lib/uuid.py#L76-L79.

I think it's common to use all caps for those that are used as flags (i.e. where each value is a power of 2 and that may be combined using bigs operations) but there is no one true way that you can enforced, it depends on the context. 

Also, note that pep8 covers the code of Python, it's not a rule that must be blindly applied to all Python code and that you may ignore it for various reasons: https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds.
History
Date User Action Args
2020-05-21 21:50:03remi.lapeyresetrecipients: + remi.lapeyre, docs@python, socketpair
2020-05-21 21:50:03remi.lapeyresetmessageid: <1590097803.31.0.658958501555.issue40721@roundup.psfhosted.org>
2020-05-21 21:50:03remi.lapeyrelinkissue40721 messages
2020-05-21 21:50:03remi.lapeyrecreate