[Python-Dev] peps 329, 266, 267

Phillip J. Eby pje at telecommunity.com
Wed Apr 21 18:35:39 EDT 2004


At 04:36 PM 4/21/04 -0500, Skip Montanaro wrote:

>     Phillip> Please note that:
>
>     Phillip> 1. None of this is needed in order to optimize builtins.  Names
>     Phillip>    that are unambiguously builtins can and should be optimized
>     Phillip>    at compile time.  Names that are ambiguous can use the
>     Phillip>    existing semantics, and nothing further need be done.
>
>Because module A can modify module B's namespace at runtime the compiler
>can't tell whether an access to len() will get the builtin or a shadow
>version.  For the above to be true the semantics of modules will have to be
>changed.

Yes, as I outlined earlier this week: we should disallow modifications of 
this kind if the text of the modified module doesn't explicitly allow it.  See:

http://mail.python.org/pipermail/python-dev/2004-April/044475.html

for details.




More information about the Python-Dev mailing list