Dave Angel <da...@dejaviewphoto.com> wrote:
>   
>You're right of course.  What I was trying to say was it deletes the 
>reference to the object.  Unlike obj = None, del obj removes the 
>reference (attribute) entirely. Although I don't know what it should be 
>called if it's a local variable.  Perhaps it "unbinds" the name.

Yes.  As far as the object is concerned, "obj = None" and "del obj" are
exactly identical.  In both cases, there is one less binding to the name.

The difference between the two is only whether the name lives on in the
namespace.

A local variable is (usually) just a name in the local() namespace.
-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to