% cat 0xfor.py
0xfor 1
% python -m tokenize -e '0xfor.py'
0,0-0,0: ENCODING 'utf-8'
1,0-1,3: NUMBER '0xf'
1,3-1,5: NAME 'or'
1,6-1,7: NUMBER '1'
1,7-1,8: NEWLINE '\n'
2,0-2,0: ENDMARKER ''
Also, literals have to be evaluated before names, otherwise you could overwrite them: >>> 0xzzz = 1
File "<stdin>", line 1
0xzzz = 1
^
SyntaxError: invalid hexadecimal literal
>>> 0xf = 1
File "<stdin>", line 1
0xf = 1
^
SyntaxError: cannot assign to literal
[0]: https://docs.python.org/3/library/stdtypes.html#float.fromhe...[1]: https://github.com/python/cpython/blob/5ce227f3a767e6e44e7c4...
[2]: https://github.com/python/cpython/blob/5ce227f3a767e6e44e7c4...