Let me answer this, since I put "del" in the language.
It's true that for breaking a cycle you can use "a = None" instead of
"del a". I would still maintain that using "del" is cleaner if you're
not going to use a further on, but that's a matter of style -- I
understand that "a = None" corresponds more closely to the C/C++
idiom.
The true reason for having "del" is of course that sometimes you just
want to remove something from a namespace -- be it the global
namespace in an interactive session (if you're through with using an
object) or in the local namespace. A good example where you really
want to delete something from a namespace, and assigning None to
itjust isn't good enough, is when you use a temporary variable in the
initialization code of a module -- you don't want it to be exported to
other code that does "from <yourmodule> import *".
PS: del isn't a function, so using "del()" is redundant and even
confusing. Not that because of its semantics, it *can't* be a
function: "del a" deletes 'a' from the current namespace. A function
can't delete something from the calling namespace (except when written
by Steve Majewski :-).
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>