[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread miss-islington
miss-islington added the comment: New changeset b502c7618d710d31517a7ee6a72890d0963e357a by Miss Islington (bot) in branch '3.9': bpo-40721: add note about enum member name case (GH-22231) https://github.com/python/cpython/commit/b502c7618d710d31517a7ee6a72890d0963e357a --

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread miss-islington
miss-islington added the comment: New changeset 624cc10ee4aae513be9f2812f6f5621b6f32f17c by Miss Islington (bot) in branch '3.8': bpo-40721: add note about enum member name case (GH-22231) https://github.com/python/cpython/commit/624cc10ee4aae513be9f2812f6f5621b6f32f17c --

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +21303 pull_request: https://github.com/python/cpython/pull/22247 ___ Python tracker

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +21304 pull_request: https://github.com/python/cpython/pull/22248 ___ Python tracker ___

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread Ethan Furman
Ethan Furman added the comment: New changeset 542e1df2b018ee7068dba8076f2d6e84efd6e144 by Ethan Furman in branch 'master': bpo-40721: add note about enum member name case (GH-22231) https://github.com/python/cpython/commit/542e1df2b018ee7068dba8076f2d6e84efd6e144 --

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-13 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +21286 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22231 ___ Python tracker ___

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-13 Thread Ethan Furman
Ethan Furman added the comment: For Python code at least, Guido has proclaimed: https://mail.python.org/pipermail/python-ideas/2016-September/042340.html I recommend naming all enums UPPER_CASE. They're constants (within a namespace) and that's the rule for constants. It's helpful for the

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker ___ ___ Python-bugs-list

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-22 Thread Florian Dahlitz
Florian Dahlitz added the comment: Should we add a note that there is no preferred way of naming enum members and provide a few examples or define some naming conventions? -- nosy: +DahlitzFlorian ___ Python tracker

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: 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

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Марк Коренберг
Марк Коренберг added the comment: FYI: PEP8 does not mention enums. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Марк Коренберг
New submission from Марк Коренберг : 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