Re: 'if name is not None:' v. 'if name:'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry Hill

    Re: 'if name is not None:' v. 'if name:'

    On Tue, Jul 15, 2008 at 4:13 PM, Reedick, Andrew <jr9445@att.com wrote:
    If name is None:
    Then name is NULL, nothing, nada, no object, no memory allocated, a
    NULL pointer
    This is just plain untrue. If 'name is None' evaluates to true, then
    the variable 'name' is bound to the singleton value None. It has
    nothing to do with allocated memory or null pointers. All it means is
    that someplace along the line you did the equivalent of 'name = None'
    in your code.

    --
    Jerry
Working...