[Zope3-Users] zopectl debug and deleting objects

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Dec 13 07:06:36 EST 2007


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
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-users mailing list