[Tutor] Is "var = None" in Python equivalent to "Set var

wesley chun wescpy at gmail.com
Mon Jun 30 06:49:44 CEST 2008

> The original author asked about the similarity between VB setting an object
> to Nothing, and Python  vars being set to None
> Your answer implies that this is an outdate practice (or not preferred) in Python

nope, i just said it doesn't appear to be standard practice. i don't
see it much in code that i've been around in the past decade+ nor do i
do it much myself. neither of those things indicate an "outdated"
practice because as far as i know, it was never the norm AFAIK. i
mean, it *may* have been before i learned Python (1.4), but i just
can't say for sure.

> > This was my own question, If you don't set an object to None- explicitly,
> then to you ever check to see if an object is None?

only in the right circumstances, i.e., i get a return value from some call.


More information about the Tutor mailing list