On Mon, Nov 24, 2014 at 3:42 PM, Steven D'Aprano <st...@pearwood.info> wrote: > Today dis() returns the above, tomorrow it may return: > > 0 LOAD_GLOBAL 0 (x) > 3 INCREMENT > 5 RETURN_VALUE > > (say), and the Python code remains the same even though the byte code is > different.
I hope not! The x in the original function was a local, not a global, and if dis.dis() says LOAD_GLOBAL for something that's not global, it would be *very* confusing! :) But yes, CPython could grow an INCREMENT bytecode, and it'd not break anything. ChrisA -- https://mail.python.org/mailman/listinfo/python-list