Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #99548
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Question about output different with command dis.dis(code) |
| Date | Thu, 26 Nov 2015 20:09:30 +1100 |
| Lines | 16 |
| Message-ID | <mailman.126.1448529727.20593.python-list@python.org> (permalink) |
| References | <f0dc1c2c-6fda-4bd8-a71b-29db358afe14@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de NRh16Sh+my5kMfrDr1rpJAMdzs6R2mDDSThM2gNbT5YA== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'heavily': 0.04; 'run-time': 0.05; 'subject:Question': 0.05; 'compile-time': 0.07; 'subject:code': 0.07; 'cc:addr:python-list': 0.09; 'subject:command': 0.09; 'python': 0.10; 'language,': 0.11; 'output': 0.13; 'interpreter': 0.15; 'thu,': 0.15; 'different?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'jython,': 0.16; 'quoted': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'byte': 0.18; 'of.': 0.18; 'input': 0.18; 'versions': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'thus': 0.24; 'header:In-Reply- To:1': 0.24; 'all.': 0.24; 'switch': 0.27; 'message- id:@mail.gmail.com': 0.27; 'code': 0.30; 'received:google.com': 0.35; 'involving': 0.35; 'nov': 0.35; 'something': 0.35; 'but': 0.36; 'instead': 0.36; 'there': 0.36; 'received:209.85': 0.36; '(and': 0.36; 'depends': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'difference': 0.38; 'received:209': 0.38; 'anything': 0.38; 'building': 0.38; 'subject:with': 0.40; 'some': 0.40; 'different': 0.63; 'great': 0.63; '26,': 0.72; 'construction': 0.72; 'chrisa': 0.84; 'to:none': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=AVjV+WvZ3rpg+IuLCrg1xXJUzjkGvJUV2zQ6Z/FiABk=; b=GXujK6Xb4elF1PMZTxm55rm05lCRIXcIk5qQKGAK72uEAJ9VZvSI6Y62AIu3R91fNH T+Y9tPhPrUf5zkTkkMmjqAjhKjqMeBJuF27CXdcgh6q+bpCfs4Zoit1IyFZTe9+uU4Yi uuNhhwzTKHwjia8RoWnHfea66SBqMKmdeWvKIt2/CwB77le/+0N73iOonGTDSDKHHX4N 8NEnlKpD/AQu0SvhDcdE5onSxsrFts77q4MWMCd8c0ejzfGrWB96zd09D6YfQHjPbyFL 5/25E45fXOQoapEUuBi0V4ErGedjeyXOm4PLjAjDwYtzpXnY7UxswZPvavSslQC+oYsY Zfiw== |
| X-Received | by 10.107.16.84 with SMTP id y81mr36818853ioi.19.1448528970116; Thu, 26 Nov 2015 01:09:30 -0800 (PST) |
| In-Reply-To | <f0dc1c2c-6fda-4bd8-a71b-29db358afe14@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:99548 |
Show key headers only | View raw
On Thu, Nov 26, 2015 at 8:02 PM, fl <rxjwg98@gmail.com> 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 versions of Python did at run-time what current versions have optimized to a compile-time construction (and thus the quick LOAD_CONST instead of the full work of building the tuple). If you switch to PyPy, Jython, IronPython, or some other implementation of the language, the byte code may be completely different - or may not be available at all. Using dis.dis is a great way of finding out what is actually happening, but it's never something you can depend on the stability of. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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