[Tutor] Deleting an instance of an object

Adam Cripps kabads at gmail.com
Thu Sep 23 11:19:22 CEST 2004

I've designed an OOP program, where I keep a catalogue of
publications. I want to be able to delete an instance of Article
(Article is a subclass of Issue, which is a subclass of Title, which
is a subclass of MagazineCollection). Each instance of Article has an
attribute name (article.name).

I've created a loop which searches through the article.name(s) and
found the one I want. The user has specified which one they want to
delete and I've collected that.

The problem I'm having is finding out the instantiation of self.name -
is there a hard and fast way of identifying a particular instance of

I'm getting the error: 
AttributeError: 'str' object has no attribute '__del__'

which is strange, as the Deleted is coming from a __del__ function
that I placed in the Article class.
proj: http://jiletters.sf.net
site: http://www.monkeez.org
wiki: http://wiki.monkeez.org

More information about the Tutor mailing list