[Grok-dev] Deleting Container items
timothywayne.cook at gmail.com
Fri Mar 6 07:52:03 EST 2009
On Fri, 2009-03-06 at 07:08 -0500, Chris McDonough wrote:
> I assume grok.Container uses a BTree to hold its subobjects.
> You shouldn't
> mutate a BTree while you iterate over its keys and values.
Ahhhhh! another BTree lesson.
> So this might work
> for x in atnames:
> del self.context['ar'][x]
That did the trick.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20090306/7700d556/attachment.bin
More information about the Grok-dev