Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #99546

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

X-Received by 10.182.142.68 with SMTP id ru4mr4340909obb.33.1448528540134; Thu, 26 Nov 2015 01:02:20 -0800 (PST)
X-Received by 10.50.134.69 with SMTP id pi5mr34161igb.5.1448528540081; Thu, 26 Nov 2015 01:02:20 -0800 (PST)
Path csiph.com!xmission!news.glorb.com!mv3no3999407igc.0!news-out.google.com!l1ni9236igd.0!nntp.google.com!mv3no3999397igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Thu, 26 Nov 2015 01:02:19 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=50.100.117.144; posting-account=SZ_svQkAAACWRFG2bDA-zgq8ILyl4-vo
NNTP-Posting-Host 50.100.117.144
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <f0dc1c2c-6fda-4bd8-a71b-29db358afe14@googlegroups.com> (permalink)
Subject Question about output different with command dis.dis(code)
From fl <rxjwg98@gmail.com>
Injection-Date Thu, 26 Nov 2015 09:02:20 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:99546

Show key headers only | View raw


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 SET_LINENO          0 
          3 LOAD_CONST          0 (1) 
          6 LOAD_CONST          1 (2) 
          9 LOAD_CONST          2 (3) 
         12 BUILD_TUPLE         3 
         15 RETURN_VALUE 


When I run the above three line code, I get the following:

dis.dis(code)
  1           0 LOAD_CONST               3 ((1, 2, 3))
              3 RETURN_VALUE        


on my Windows 7 PC Canopy. Are there something, my input or Python difference
make the output different?

Thanks,

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Question about output different with command dis.dis(code) fl <rxjwg98@gmail.com> - 2015-11-26 01:02 -0800
  Re: Question about output different with command dis.dis(code) Random832 <random832@fastmail.com> - 2015-11-26 04:12 -0500
  Re: Question about output different with command dis.dis(code) Chris Angelico <rosuav@gmail.com> - 2015-11-26 20:09 +1100
  Re: Question about output different with command dis.dis(code) Steven D'Aprano <steve@pearwood.info> - 2015-11-27 12:28 +1100

csiph-web