"Ara Kooser" <[EMAIL PROTECTED]> wrote

>   I have two instances called and running. They interact with each
> other and I would like one of the instances to cease to exist in the
> second round based on a given condition. How do you kill an 
> instance?

Either set the variable to something else or explicitly with del()

class C: pass

c = C()  # create a C instance

c = 42   # the C instance gets garbage collected

or

c -= C()  # another instance

del(c)   # delete it.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to