Dieter Maurer wrote:
> It does not go wrong with Zope 2.11/Python 2.4, neither.
> Maybe, changes done for Python 2.5/2.6 compatibility broke something.
> 
> Here is a simpler script to check for problems:

Indeed:

 >>> class C:
...   l=[1,2,3]
...   def __getitem__(self, i):
...       return self.l[i]
list(_)

...
from Acquisition import Implicit
class C(Implicit):
 >>> c=C()
   def __getitem__(self, i):
 >>> iter(c)

<iterator object at 0xb7db8ecc>
 >>> list(_)
iter(c)
[1, 2, 3]
 >>>
list(_)
 >>> from Acquisition import Implicit
iter(c2)
list(_)
 >>> class C(Implicit):
...   l=[1,2,3]
...   def __getitem__(self, i):
...       return self.l[i]
...
 >>> c=C()
 >>> iter(c)
<iterator object at 0xb7dbb38c>
 >>> list(_)
[1, 2, 3]
 >>> c2=C().__of__(c)
 >>> iter(c2)
Traceback (most recent call last):
   File "<console>", line 1, in <module>
AttributeError: __iter__

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to