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/2016-October/146573.html below:

[Python-Dev] __future__ and eval()

[Python-Dev] __future__ and eval() [Python-Dev] __future__ and eval()Christian Tismer tismer at stackless.com
Sat Oct 1 07:39:45 EDT 2016
Hi guys,

when developing my dedent tool, I stumbled over the following
behavior:

In dedent, I had the line

     from __future__ import print_function

Later in the script, I do some

     exec(the_script)

and I was surprised:
The exec() script inherited the __future__ statement!
It behaved like the future statement were implicitly there.

Is that a bug or a feature?

You can try the effect by "pip install dedent" and adding
the future statement there.

I'd like to know if this is a bug (and I think so)

-- 
Christian Tismer             :^)   tismer at stackless.com
Software Consulting          :     http://www.stackless.com/
Karl-Liebknecht-Str. 121     :     https://github.com/PySide
14482 Potsdam                :     GPG key -> 0xFB7BEE0E
phone +49 173 24 18 776  fax +49 (30) 700143-0023
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