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 email@example.com wrote:
On Apr 13, 2021, at 12:52, Serhiy Storchaka firstname.lastname@example.org wrote:
New example was found recently (see https://bugs.python.org/issue43833).
[0x1for x in (1,2)]
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 -- email@example.com To unsubscribe send an email to firstname.lastname@example.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://email@example.com/message/7JXD7SOH... Code of Conduct: http://python.org/psf/codeofconduct/