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

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to