Chris Angelico wrote: > 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,
D'oh! I mean, yes, that was a test to see if you were paying attention, and you have passed! Well done. *whistles nonchalantly* -- Steven -- https://mail.python.org/mailman/listinfo/python-list