del

Erik Max Francis max at alcyone.com
Fri Feb 14 20:00:45 EST 2003


Daniel Silva wrote:

> What is the purpose of the del statement?  Why would you want to
> undefine
> a variable?  More precisely, how many programs would be broken if a
> python
> compiler did not implement it?

Don't forget that it's also used for removing elements from sequences
and keys from mappings.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ You win the victory when you yield to friends.
\__/ Sophocles
    Bosskey.net: Quake III Arena / http://www.bosskey.net/q3a/
 A personal guide to Quake III Arena.




More information about the Python-list mailing list