[Python-Dev] PEP 3003 - Python Language Moratorium
Dino Viehland
dinov at microsoft.com
Thu Nov 5 22:55:27 CET 2009
Stefan wrote:
> I assume that this is artificially exaggerated to make a point, as this
> behaviour is obviously not a technical requirement but an optimisation,
> which could potentially be disabled.
>
If there's a way to disable this then that's fine and IMO when it was disabled
you'd still be Python. But changing behavior in the name of optimization is
no longer just an optimization.
For what it's worth in IronPython we're going to look at making this faster
in the future as well. We already cache built-in values locally in a module
and invalidate the cache when the builtins changes. In the future I'd like to
even combine loading a global and invoking it into a single call site for even
better optimizations. And you could even imagine an extreme scenario
where when built-ins changed all the code in the system that depended upon
them is re-compiled punishing users who actually do this but I doubt we'll go
that far.
But the important thing is that the optimizations don't change the language
behavior otherwise I don't think you're still Python. But of course that's
what makes it so challenging and fun to try and optimize Python :)
More information about the Python-Dev
mailing list