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/2003-March/034248.html below:

[Python-Dev] Fast access to __builtins__

[Python-Dev] Fast access to __builtins__Neil Schemenauer nas@python.ca
Thu, 27 Mar 2003 18:26:49 -0800
M.-A. Lemburg wrote:
> Using the -O for this is not a working possibility. -OO
> is reserved for optimizations which can change semantics,
> but even there, I'd rather like a per-module switch than
> a command line switch.

Optimization options that globally change semantics seem like a bad
idea.  How would you know some module you are using will not break?  I
agree with Mark that a per-module switch would be better.

In this case, I'm not sure either option is necessary.  If I understand
Guido correctly, eventually programs may not be allowed to stick names
into other modules that override builtins used by that module.  If that
is disallowed then the compiler knows if a name is a builtin or a
global.

We could introduce a warning for code that breaks the new rules and have
a __future__ statement that implements the optimization.

  Neil



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