[Python-Dev] Unexpected bytecode difference (original) (raw)
Alexander Belopolsky alexander.belopolsky at gmail.com
Fri Jan 19 18:46:58 EST 2018
- Previous message (by thread): [Python-Dev] Intention to accept PEP 567 (Context Variables)
- Next message (by thread): [Python-Dev] Unexpected bytecode difference
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have encountered the following difference between Python 3 and 2:
(py3)
compile('xxx', '<>', 'eval').cocode b'e\x00S\x00'
(py2)
compile('xxx', '<>', 'eval').cocode 'e\x00\x00S'
Note that 'S' (the code for RETURN_VALUE) and a zero byte are swapped in Python 2 compared to Python 3. Is this change documented somewhere?
- Previous message (by thread): [Python-Dev] Intention to accept PEP 567 (Context Variables)
- Next message (by thread): [Python-Dev] Unexpected bytecode difference
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]