On 8/07/20 12:48 pm, Chris Angelico wrote:
"for x[0] in iter:" uses x[0] as an assignment target,
You're right, there are some others, but I think they're equally clear -- all the ones I can think of are directly after a keyword ("for", "as", "import", etc.) But in match statements, they can be arbitrarily intermingled with other expression-like stuff.
You're right about the presence/absence of a dot being very subtle, but hang tight, wait for the next publication of the PEP; its authors are working on that exact problem.
It looks like the only thing they're doing is dropping the *leading* dot case -- without providing any replacement for it. That only addresses one small part of my concern, since I think the non-leading dot is nearly as subtle. Maybe even more so, since at least the leading dot was obviously something different. Also I don't like the idea of being *forced* to use a namespace for my constants, regardless of how good an idea the PEP authors think it is. -- Greg _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/2A2NCXMJUFBF542M2VCEQ7ZDKICYJQHK/ Code of Conduct: http://python.org/psf/codeofconduct/