[Python-ideas] Optimizing builtins

Benjamin Peterson benjamin at python.org
Sat Jan 1 21:35:28 CET 2011

Guido van Rossum <guido at ...> writes:
> The compiler has no way to notice this when a.py is being compiled.

You could still optimize it if you insert a runtime "guard" before the range
usage and see if its been overridden.

More information about the Python-ideas mailing list