Default method arguments
duncan.booth at invalid.invalid
Tue Nov 15 19:09:37 CET 2005
Nicola Larosa wrote:
>> Using None might be problematic if None could be a valid argument.
> That's like saying that NULL could be a significant value in SQL. In
> Python, "None" *is* the empty, not significant value, and should
> always be used as such. Specifically, never exchange "None" for
You don't think there is a difference in SQL between a field explicitly set
to NULL or a field initialised with a default value?
What you should be saying here is never use "None" when you actually mean
"use the default non-None value for this parameter".
More information about the Python-list