A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-July/101315.html below:

[Python-Dev] Can Python implementations reject semantically invalid expressions?

[Python-Dev] Can Python implementations reject semantically invalid expressions? [Python-Dev] Can Python implementations reject semantically invalid expressions?Mark Dickinson dickinsm at gmail.com
Fri Jul 2 13:39:18 CEST 2010
On Fri, Jul 2, 2010 at 12:25 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> Craig, what are you using to get that? When I try it in Python 3.1, I
> get:
>
> TypeError: don't know how to disassemble str objects
>
> How do you get that result?

As I just discovered (see above), dis.dis is happy to interpret byte
strings (i.e., strings in 2.x, bytes in 3.x) as direct representations
of Python bytecode.

There's also an open feature request[1] to allow text strings as input
in py3k, doing an automatic compile before passing the result to
dis.dis.

Mark

[1] http://bugs.python.org/issue6507
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4