0xfor 3. Parser bug?

This was just posted on SO https://stackoverflow.com/questions/67083039/why-does-python-return-15-for-0... 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

14.04.21 13:22, Stefano Borini пише:
It is already discussed in thread > https://mail.python.org/archives/list/python-dev@python.org/thread/D2WPCITHG... It does not contradict specification, but looks pretty confusing, so we will likely change specification and implementation to prevent confusion.

14.04.21 13:22, Stefano Borini пише:
It is already discussed in thread > https://mail.python.org/archives/list/python-dev@python.org/thread/D2WPCITHG... It does not contradict specification, but looks pretty confusing, so we will likely change specification and implementation to prevent confusion.
participants (2)
-
Serhiy Storchaka
-
Stefano Borini