I feel like all of these examples, if found in the wild, are far more likely to be uncaught bugs than programmer intent. Being strict about spaces (or parents, brackets, etc. in other contexts) around numbers is much more straightforward than a number of edge cases where is not obvious what will happen.

On Tue, Apr 13, 2021, 6:24 PM Barry Warsaw <barry@python.org> wrote:
On Apr 13, 2021, at 12:52, Serhiy Storchaka <storchaka@gmail.com> wrote:
> New example was found recently (see https://bugs.python.org/issue43833).
>>>> [0x1for x in (1,2)]
> [31]
> It is parsed as [0x1f or x in (1,2)] instead of [0x1 for x in (1,2)].

That’s a wonderfully terrible example!  Who’s maintaining the list? :D


Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/7JXD7SOHACL5SFTA4SBIOWPEG625LD34/
Code of Conduct: http://python.org/psf/codeofconduct/