Assigning to None (was Re: Question about Python)

François Pinard pinard at iro.umontreal.ca
Fri Jul 1 12:59:20 EDT 2005


[Peter Hansen]
> Mike Meyer wrote:
> > Yes. I once grabbed an old program that did assignments to None. But
> > that's always been a bad idea.

> What was the use case!?

People used to assign None to itself as a keyword argument in function
headers.  The goal was to make a local copy of the reference, which was
then accessed faster than the global thing.

-- 
François Pinard   http://pinard.progiciels-bpi.ca



More information about the Python-list mailing list