[ZCM] [ZC] 2287/ 4 Comment "membership and iteration in form records"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Thu Mar 1 04:53:39 EST 2007


Issue #2287 Update (Comment) "membership and iteration in form records"
 Status Pending, Zope/feature medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2287

==============================================================
= Comment - Entry #4 by bcroq on Mar 1, 2007 4:53 am


Uploaded:  "patch"
 - http://www.zope.org/Collectors/Zope/2287/patch/view
Thanks for the tips... here is a simple patch.
Sorry, no unittest, but it has been tested.
________________________________________
= Comment - Entry #3 by philikon on Feb 28, 2007 10:59 am

To give you a hint where to start: the class that's responsible for records is ZPublisher.HTTPRequest.record. A simple unit test should accompany the patch.
________________________________________
= Comment - Entry #2 by ajung on Feb 28, 2007 9:13 am

Patches are welcome
________________________________________
= Request - Entry #1 by bcroq on Feb 28, 2007 8:50 am

When submitting a form with :record fields (eg: <input name="myrecord.thekey:record" value="value"/>) we get dict-like object for these fields.

It would be great if we could use "if 'thekey' in form.myrecord:..." and "for key in myrecord:..." as it is possible to do with dict since Python 2.4.

By now, we have to use "if 'thekey' in form.myrecord.keys():..." and "for key in myrecord.keys():..." as with Python < 2.4.
==============================================================



More information about the Zope-Collector-Monitor mailing list