[Python-Dev] Re: redefining is (original) (raw)
Barry Warsaw barry at python.org
Fri Mar 19 14:16:52 EST 2004
- Previous message: [Python-Dev] Re: redefining is
- Next message: [Python-Dev] Re: redefining is
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 2004-03-19 at 13:54, Casey Duncan wrote:
The problem is that 'obj == None' is not the assertion you want to make usually. 'obj == None' means "obj claims it is equal to None", whereas 'obj is None' means 'obj is the None object'. The latter is a much more stringent assertion than the former which relies on the particular implementation of obj.
Exactly.
-Barry
- Previous message: [Python-Dev] Re: redefining is
- Next message: [Python-Dev] Re: redefining is
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]