[EMAIL PROTECTED] wrote: > On Apr 18, 3:19 pm, Steven Howe <[EMAIL PROTECTED]> wrote: > >> I've read and found that 'None' comparisons is not always a good idea. >> Better to: >> from types import NoneType >> >> x = None >> if type( x ) == NoneType: >> # true >> < code > >> else: >> # false; do something else. >> < more code > >> >> Steven Howe >> > > Is that any better than this? > > if x is None: > # do something > else: > # do something else > No. using if x is None: is the recommended way.
Gary Herron -- http://mail.python.org/mailman/listinfo/python-list