[Python-Dev] towards a faster Python

Guido van Rossum guido@python.org
2003年6月10日 10:16:47 -0400


> Guido van Rossum wrote:
>> > IOW:
> > 
> > # module foo
> > def open(): return ...
> > 
> > is fine, but
> > 
> > import foo
> > foo.open = 42
> > 
> > is not.
>> How about this:
>> # module foo
> def open(): ...
>> # module bar
> import foo
> foo.open = 42
>> ?
>> (I would assume it to be ok, since the builtin name was already
> shadowed.)

Yes, this wouldn't break in any new ways due to the proposed
optimization, and you won't get the warning because it only warns
about inserting new names.
--Guido van Rossum (home page: http://www.python.org/~guido/)

AltStyle によって変換されたページ (->オリジナル) /