Skip to content

Commit 2adbeaa

Browse files
committed
Implement __iter__ for wxList iterator classes
This fixes being able to use these classes in for loops, for example. Specifically it fixes the cmdproc tests with Python 3.13.1.
1 parent 744801f commit 2adbeaa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

etgtools/tweaker_tools.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,11 @@ class {ListClass}_iterator {{
10551055
if (PyErr_Occurred())
10561056
return NULL;
10571057
%End
1058+
1059+
PyObject* __iter__();
1060+
%MethodCode
1061+
return PyObject_SelfIter(sipSelf);
1062+
%End
10581063
}};
10591064
10601065
class {ListClass}

0 commit comments

Comments
 (0)