Python 2.4: Why only assignments to None are forbiden?

Terry Reedy tjreedy at udel.edu
Sat Nov 13 19:24:12 EST 2004


"Andrew Dalke" <adalke at mindspring.com> wrote in message 
news:eivld.25773$KJ6.22637 at newsread1.news.pas.earthlink.net...
> Peter Hansen wrote:
>> One perfectly good reason to assign to builtins (and there are others, 
>> I'm sure) is to provide a "mock" function to replace a standard
>> one, for use during automated testing.
>
> That's understandable, but it doesn't work for None.

Peter was not suggesting that replacement of None be allowed but that 
replacement of things like file() should continued to be allowed and not 
prohibited as someone (I believe other than the OP) suggested.

Terry J. Reedy






More information about the Python-list mailing list