"wesley chun" <[EMAIL PROTECTED]> wrote

one question i'd like to ask is, in what context is such a line part
of your code? altho alan is correct in that syntactically, they're
very similar, i'm wondering what you're using it for.

That's a very good point.

The normal way to delete a reference to an object in Python
would be to use del(objVar). Assigning to None tends only to
be needed is if you are reusing the same variable to point to
multiple (or optional)  objects and don't want to recreate the
variable each time. That is, as Wesley says, rather uncommon.

The other use for v=None is in default parameter definitions,
but in that case its usually quite different to the VB example!

--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to