In Zope 2.4.3 binary on Linux
import operator
reduce(operator.add,[0,1,2,3,4])
gives me Error Value: global name 'reduce' is not defined
Is this a faq?
Brad Clements,[EMAIL PROTECTED] (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
On Thu, 6 Dec 2001, Brad Clements wrote:
In Zope 2.4.3 binary on Linux
import operator
reduce(operator.add,[0,1,2,3,4])
try _.reduce()
gives me Error Value: global name 'reduce' is not defined
this shkould be clear enough as a message.
zope can't find the reduce function.
On 6 Dec 2001 at 16:12, Romain Slootmaekers wrote:
reduce(operator.add,[0,1,2,3,4])
try _.reduce()
This is in a Python Script, I'm not using the DTML namespace.
Note that map() and filter() work without a problem, so why not reduce() ?
this shkould be clear enough as a message.
On Thu, 6 Dec 2001, Brad Clements wrote:
On 6 Dec 2001 at 16:12, Romain Slootmaekers wrote:
reduce(operator.add,[0,1,2,3,4])
try _.reduce()
This is in a Python Script, I'm not using the DTML namespace.
Note that map() and filter() work without a problem, so why not
indeed. in
lib/python/AccessControl/ZopeGuards.py
the guarded_reduce isn't there
those who are are:
['cmp', 'round', 'AttributeError', 'random', 'str', 'range',
'ArithmeticError', 'whrandom', 'unichr', 'list', 'FloatingPointError',
'getattr', 'hasattr', 'setattr', 'IndexError',