Op 2006-03-27, Donn Cave schreef <[EMAIL PROTECTED]>:
> In article <[EMAIL PROTECTED]>,
>  "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> ...
>> So - your conclusion is basically right: use is on (complex) objects, not on
>> numbers and strings and other built-ins. The exception from the rule is
>> None - that should only exist once, so
>> 
>> foo is not None
>> 
>> is considered better style than foo == None.
>
> But even better style is just `foo' or `not foo'.  Or not,
> depending on what you're thinking.

No it is not. When you need None to be treated special,
that doesn't imply you want to treat zero numbers or empty
sequences as special too.

-- 
Antoon Pardon
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to