On Tue, 7 Jul 2020 at 17:09, Paul Moore
On Tue, 7 Jul 2020 at 15:40, Henk-Jaap Wagenaar
wrote: On Tue, 7 Jul 2020 at 15:04, Rob Cliffe via Python-Dev <
python-dev@python.org> wrote:
I don't like the .name syntax (grit on Tim's monitor; does not suggest the meaning). [...] But I don't know what syntax (where
necessary) to suggest.
+1(000)
There's been traffic on the PEP repository which suggests that there is a new version of the PEP incoming which responds to these types of concern. I'm not willing to read raw rst diffs, so I haven't checked any of the details.
"PEP 622: Ditch leading dots for name loads": this is now an ex-syntax, it is bereft of life (for this, draft, of the PEP, might come back later!): https://github.com/python/peps/commit/f1de4f169d762cbb46fbfe94d2c01839db9b2f... In there, it makes a good point that namespaced constants are good, especially for this kind of thing (you probably want to e.g. match over a bunch of possible constants which you can then put in an enum or some other namespace).