mark at mceahern.com
Thu Jan 15 05:01:46 CET 2004
On Wed, 2004-01-14 at 17:23, user at domain.invalid wrote:
> Say I have an object (foo), that contains an
> array (bar) of references to other objects.
> Now I want to puff some of the objects from the
> array so that I remove the array element, and
> destroy the oject.
> but when I do:
> del foo.bar
> Python says:
> object doesn't support item deletion
It'd be helpful if you supplied the code in question. Then again, we
wouldn't be able to let our imagination wander with what puff might
Anyway, is this the sort of thing you're talking about?
self.bar = 
return '<Foo><bar>%s</bar></Foo>' % (str(self.bar),)
l = range(10)
foo = Foo()
print 'foo = %s' % (str(foo),)
print 'l = %s' % (l,)
More information about the Python-list