[ZCM] [ZC] 2287/ 9 Resolve "membership and iteration in form records"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Mon, 24 Sep 2007 18:11:47 -0400
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #2287 Update (Resolve) "membership and iteration in form records"
 Status Resolved, Zope/feature low
To followup, visit:
  http://www.zope.org/Collectors/Zope/2287

==============================================================
= Resolve - Entry #9 by tseaver on Sep 24, 2007 6:11 pm

 Status: Accepted => Resolved

Applied to 2.9 branch:

 http://svn.zope.org/Zope/branches/2.9/?rev=79911&view=rev

2.10 branch:

 http://svn.zope.org/Zope/branches/2.10/?rev=79912&view=rev

and the trunk:

 http://svn.zope.org/Zope/trunk/?rev=79930&view=rev
________________________________________
= Accept - Entry #8 by tseaver on Sep 24, 2007 6:16 am

 Status: Pending => Accepted

 Supporters added: tseaver

Thanks for the patc.
________________________________________
= Comment - Entry #7 by bcroq on Sep 24, 2007 3:21 am


Uploaded:  "HTTPRequest_record_more_dict_like.patch"
 - http://www.zope.org/Collectors/Zope/2287/HTTPRequest_record_more_dict_like.patch/view
I repost the patch, with 3 tests (one per method)
________________________________________
= Edit - Entry #6 by ajung on Mar 12, 2007 1:26 pm

 Changes: submitter email, edited transcript, importance (medium => low)
________________________________________
= Comment - Entry #5 by ajung on Mar 1, 2007 4:58 am

A patch requires tests in order to be accepted.
________________________________________
= 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.
==============================================================