[Python-Dev] 0xfor 3. Parser bug?

2021年4月14日 03:27:15 -0700

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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/V6HMVBY4DO7IB7MQO2CAZFY7RJWAV7BB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to