New submission from sco1 :
Came across this riddle today:
>>> [0x_for x in (1, 2, 3)]
[15]
Initially I thought this was related to PEP 515 but the unexpected behavior
extends to simpler examples as well, such as:
>>> x = 5
>>> 123or x
123
>>> 123and x
sco1 added the comment:
Sorry, the bonus, while fun, I don't think is related
--
___
Python tracker
<https://bugs.python.org/issue43833>
___
___
Pytho
sco1 added the comment:
Appreciate the additional historical context, I also was pointed to this in the
documentation:
https://docs.python.org/3/reference/lexical_analysis.html#whitespace-between-tokens
If a parsing change is undesired from a backwards compatibility standpoint,
would it be
sco1 added the comment:
We can also see this kind of thing with other literals, would that be in scope
here?
e.g.
```
Python 3.9.4 (default, Apr 5 2021, 12:33:45)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "lice
sco1 added the comment:
Makes sense, thanks!
--
___
Python tracker
<https://bugs.python.org/issue43833>
___
___
Python-bugs-list mailing list
Unsubscribe: