How to delete yourself????

Istvan Albert istvan.albert at gmail.com
Fri Oct 14 13:04:10 EDT 2005


> But is this nice code??? Is there another way to delete yourself???

I think you are overcomplicating things.

Don't think of it as deleting 'itself', since what you seem to need is
deleting a reference to the instance.

In your example the parent is a container and  it usually makes more
sense to have the only the container deal with adding and deleting
elements, that way your objects are less coupled.

Istvan.




More information about the Python-list mailing list