Use cases for del

Peter Hansen peter at
Wed Jul 6 15:45:56 CEST 2005

Tom Anderson wrote:
> How about just getting rid of del? Removal from collections could be 
> done with a method call, and i'm not convinced that deleting variables 
> is something we really need to be able to do (most other languages 
> manage without it).

Arguing the case for del: how would I, in doing automated testing, 
ensure that I've returned everything to a "clean" starting point in all 
cases if I can't delete variables?  Sometimes a global is the simplest 
way to do something... how do I delete a global if not with "del"?


More information about the Python-list mailing list