share function argument between subsequent calls but not between class instances!

Duncan Booth duncan.booth at invalid.invalid
Mon Feb 20 03:52:09 EST 2006


Ben Finney wrote:

> Duncan Booth <duncan.booth at invalid.invalid> writes:
>> If you intend to only use the default some of the time, and at other
>> times pass in a different list, then save the 'default' in the
>> instance and use a special marker value to indicate when you intend
>> the default to be used:
> 
> The most common idiom for such a marker is the None value.
> 

Can you provide any firm evidence that using None is more common?

Both uses are common. Use whichever you are happier with (except of course 
in the case where None is a potential value distinct from the default).



More information about the Python-list mailing list