Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
9cd3743d
Commit
9cd3743d
authored
Apr 15, 2009
by
Andreas Zeidler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backport r99191 to 2.10
parent
cfd9081b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
lib/python/Acquisition/_Acquisition.c
lib/python/Acquisition/_Acquisition.c
+1
-1
lib/python/Acquisition/tests.py
lib/python/Acquisition/tests.py
+20
-0
No files found.
lib/python/Acquisition/_Acquisition.c
View file @
9cd3743d
...
...
@@ -822,7 +822,7 @@ Wrapper_contains(Wrapper *self, PyObject *v)
static
PyObject
*
Wrapper_iter
(
Wrapper
*
self
)
{
return
CallMethodO
(
OBJECT
(
self
),
py__iter__
,
NULL
,
NULL
);
return
PyObject_GetIter
(
self
->
obj
);
}
static
PySequenceMethods
Wrapper_as_sequence
=
{
...
...
lib/python/Acquisition/tests.py
View file @
9cd3743d
...
...
@@ -1719,6 +1719,26 @@ def test_proxying():
iterating...
[42]
Finally let's check that https://bugs.launchpad.net/zope2/+bug/360761
has been fixed:
>>> class C(Acquisition.Implicit):
... l=[1,2,3]
... def __getitem__(self, i):
... return self.l[i]
>>> c1 = C()
>>> type(iter(c1))
<type 'iterator'>
>>> list(c1)
[1, 2, 3]
>>> c2 = C().__of__(c1)
>>> type(iter(c2))
<type 'iterator'>
>>> list(c2)
[1, 2, 3]
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment