Re: Question about output different with command dis.dis(code)

2015-11-26 Thread Steven D'Aprano
On Thu, 26 Nov 2015 08:02 pm, fl wrote: > Hi, > > I see the following from a previous post: > > > Python 1.5.2 (#1, Aug 27 2012, 09:09:18) [GCC 4.1.2 20080704 (Red Hat > 4.1.2-52)] on linux2 > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam import dis code =

Question about output different with command dis.dis(code)

2015-11-26 Thread fl
Hi, I see the following from a previous post: Python 1.5.2 (#1, Aug 27 2012, 09:09:18) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import dis >>> code = compile("(1, 2, 3)", "", "eval") >>> dis.dis(code) 0

Re: Question about output different with command dis.dis(code)

2015-11-26 Thread Random832
fl writes: > Python 1.5.2 (#1, Aug 27 2012, 09:09:18) [GCC 4.1.2 20080704 (Red Hat > 4.1.2-52)] on linux2 The context of the post was discussing the behavior of a very old version of python. I'm not sure how you missed this. > When I run the above three line code, I get the

Re: Question about output different with command dis.dis(code)

2015-11-26 Thread Chris Angelico
On Thu, Nov 26, 2015 at 8:02 PM, fl wrote: > Are there something, my input or Python difference > make the output different? Anything involving the disassembly of Python code depends heavily on internal interpreter details. You just quoted something showing that ancient