self destruction :)

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Thu Jun 27 17:20:34 EDT 2002


"Guyon Morée" <gumuz at looze.net> writes:
> i've got a list of dynamicaly instantiated objects of a class of my own. how
> can i let one of the objects delete itself?
> 
> i've tried: 'del self', but somehow it didn't work. afterwards it should
> also _not_ be in the list anymore.

You mean you have 

  x = [a, b, c]

and you want to remove b from the list?

Just say "del x[1]".



More information about the Python-list mailing list