This was just posted on SO

https://stackoverflow.com/questions/67083039/why-does-python-return-15-for-0xfor-x-in-1-2-3

I can reproduce it with a simpler example

>>> 0xfor 3
15

Is it a bug in the parser, or working as intended? It's not only for
hex. This works to

>>> 3or 50
3



-- 
Kind regards,

Stefano Borini
_______________________________________________
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/V6HMVBY4DO7IB7MQO2CAZFY7RJWAV7BB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to