Permanent objects?
Dave Brueck
dave at pythonapocrypha.com
Thu Dec 26 22:29:58 EST 2002
More information about the Python-list mailing list
Thu Dec 26 22:29:58 EST 2002
- Previous message (by thread): Permanent objects?
- Next message (by thread): Permanent objects?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 25 Dec 2002, Kevin Altis wrote: > Hmm, I think I tend to use > > if x == None: > and > if x != None: > > rather than > > if x is None: > and > if not x is None: > > I don't suppose it really matters or that one is better or clearer than the > other? Somebody else in this thread gave a nice explanation of why 'is' makes sense when None is used as a sentinel, so I'll just add that the following is valid Python too: if x is not None: dosomething (ie you don't have to use "if not (x is None)" or something). -Dave
- Previous message (by thread): Permanent objects?
- Next message (by thread): Permanent objects?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list