[Zope-dev] Python Script bug?
Chris Withers
chrisw@nipltd.com
Tue, 10 Jul 2001 11:32:45 +0100
Hi,
The following code:
objects = map(lambda b: b.getObject,brains)
Results in:
Error type: Unauthorized
Error value: __len__
File E:\Zope\current\Products\CMFCore\FSPythonScript.py, line 187, in _exec
(Object: index_html_postings)
(Info: ({'script': <FSPythonScript instance at 01BB2C20>, 'context':
<SwishdotSite instance at 01C09950>, 'container': <SwishdotSite instance at
01C09950>, 'traverse_subpath': []}, (), {}, None))
File Script (Python), line 5, in index_html_postings
File E:\Zope\2379B4~1.2\lib\python\Products\PythonScripts\Guarded.py, line
204, in __careful_map__
(Object: <lambda>)
File E:\Zope\2379B4~1.2\lib\python\Products\PythonScripts\Guarded.py, line
273, in __getattr__
File E:\Zope\2379B4~1.2\lib\python\Products\PythonScripts\Guarded.py, line
152, in __careful_getattr__
...and yet the following code:
objects = []
for brain in brains:
objects.append(brain.getObject())
...works fine.
This is on Zope 2.3.2, is it a bug?
cheers,
Chris