Kevin Howe writes:
for name,value in REQUEST.form.items:
Try:
for name,value in REQUEST.form.items():
"items" is a method that must be called to return a sequence
of tuples.
Dieter
___
Zope maillist - [EMAIL PROTECTED]
On Tue, Aug 08, 2000 at 04:16:15PM -0300, Kevin Howe wrote:
I'm trying to do a FOR statement to loop though items in a REQUEST, but keep
getting errors:
def myMethod(self,REQUEST):
for name,value in REQUEST.form:
# do this
I've tried variations:
for name,value in REQUEST.items:
e] interating though REQUEST.form in python???
Have you tried?:
for name,value in REQUEST.form.keys:
# kewl stuff
- Original Message -
From: Kevin Howe [EMAIL PROTECTED]
To: ZOPE Mailing List [EMAIL PROTECTED]
Sent: Tuesday, August 08, 2000 8:16 PM
Subject: [Zope] interating
for name,value in REQUEST.form.keys():
Note the function call (parentheses).
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998
___
Zope maillist - [EMAIL PROTECTED]