[Zope3-Users] zopectl debug and deleting objects

Justin Fletcher justin at opensoft.ws
Thu Dec 13 07:30:38 EST 2007


On Thu, 2007-12-13 at 07:06 -0500, Stephan Richter wrote:
> On Thursday 13 December 2007, Justin Fletcher wrote:
> > for i in root['mysite'].keys():
> >      del(root['mysite'][i])
> 
> "keys()" produces an iterator that assumes the data structure is not changed; 
> Use list(root['mysite'].keys()) instead.
> 
> Regards,
> Stephan


Ah.. I understand.  This is exactly what I needed.

Thanks again,
-Justin



More information about the Zope3-users mailing list