On Wed, 16 Nov 2011 06:53:26 +1100, Chris Angelico wrote: > On Wed, Nov 16, 2011 at 5:17 AM, Dave Angel <d...@davea.name> wrote: >> a = someexpression... >> b = a >> .... >> del a >> >> Does not (necessarily) delete the object that a refers to. It merely >> deletes the symbol a. > > I'd have to classify that as part of the change of thinking necessary > for a refcounted language, and not specific to del at all.
Languages aren't refcounted. Or at least, *Python* isn't a refcounted language. CPython is a refcounted implementation. IronPython and Jython are not. del behaves exactly the same in IronPython and Jython as it does in CPython: it removes the name, which may have a side-effect of deleting the object. > The del > statement is identical to "a = None" in terms of deleting objects; I'm not entirely sure what you arr trying to say here. I *think* you are trying to say is this: Given that `a` is bound to my_object initially, `del a` from the point of view of my_object is no different from re-binding a to some other object such as None (or any other object). which is true as far as it goes, but it fails to note that the name "a" no longer exists after `del a` while it does exist after `a = None`. -- Steven -- http://mail.python.org/mailman/listinfo/python-list