Use cases for del

Grant Edwards grante at visi.com
Wed Jul 6 17:57:54 EDT 2005


On 2005-07-06, Ron Adam <rrr at ronadam.com> wrote:

> It would be a way to set an argument as being optional without actually 
> assigning a value to it.  The conflict would be if there where a global 
> with the name baz as well.  Probably it would be better to use a valid 
> null value for what ever baz if for.  If it's a string then "", if its a 
> number then 0, if it's a list then [], etc...

Except those aren't "null values" for those types.  0 is a
perfectly good integer value, and I use it quite often. There's
a big difference between an "invalid integer value" and an
integer with value 0.

-- 
Grant Edwards                   grante             Yow!  I've read SEVEN
                                  at               MILLION books!!
                               visi.com            



More information about the Python-list mailing list