Carl Banks wrote: > Bruno Desthuilliers wrote: >> In python, assignement is a statement, not an expression, so there's no >> way you could write 'if obj = None' by mistake (-> syntax error). So >> this style is unpythonic. Also, None is a singleton, and identity test >> is way faster than equality test. > > Playing Devil's advocate here: if you were to write "x!=None", then x's > __eq__ method is invoked, which might not account for the possibility > that the other operand is None. > > However, if you write "None!=x", then None's __eq__ method is invoked, > which accounts for any given type. >
Well... Since we all know it should be an identity test anyway... <g> -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list