del
Daniel Silva
dsilva at ccs.neu.edu
Fri Feb 14 18:49:09 EST 2003
>> Why would you want to undefine a variable? More precisely, how
>> many programs would be broken if a python compiler did not
>> implement it?
> I often use it to delete items from a list or dictionary:
That's fine. It's easy to map it to a container.remove_item equivalent.
But would you ever write this?:
x = 3
del x
Removing items from a container in-place is ok, but I don't see the point
of actually undefining variables.
- Daniel
More information about the Python-list
mailing list