Jan. 19, 2018
11:46 p.m.
I have encountered the following difference between Python 3 and 2: (py3)
compile('xxx', '<>', 'eval').co_code b'e\x00S\x00'
(py2)
compile('xxx', '<>', 'eval').co_code '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?