default arguments newbie question

Aahz Maruch aahz at panix.com
Wed Jan 10 19:27:08 EST 2001


In article <3A5CD60D.98CFAD33 at alcyone.com>,
Erik Max Francis  <max at alcyone.com> wrote:
>Aahz Maruch wrote:
>
>> Yup.  Technically, you really want to write "if l is None", though; if
>> you don't actually care about it being precisely None, the common
>> idiom
>> is to write "if l".
>
>Eh?  I don't see that.  Any value which is not None will compare unequal
>to None, correct?  Certainly this true for the fundamental types like
>strings, numbers, tuples, and lists:

You must have missed the post recently where someone showed a class that
compared equal to None.
-- 
                      --- Aahz (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Sometimes, you're not just out of left field, you're coming in all the
way from outer space.  --Aahz



More information about the Python-list mailing list