what exactly is "None" ?

Nagy László Zsolt nagylzs at freemail.hu
Tue Mar 4 11:28:46 EST 2003


>
>
>I know that "None" is the Boolean false value that
>gets thrown out when there's nothing to return or a
>function doesn't manage to reach the end of itself and thus "return
>whatever", but *what* (in Python terms) exactly is equal to "None" ???
>
>I ask this as I'm trying to set up some conditional statements that do
>something if "whatever" is equal to "None".
>  
>
You can write this:

obj is None

See the 'is' operator for details (same as "  id(obj) == id(None) " ).

  Laci 1.0







More information about the Python-list mailing list