Skip to content

Commit

Permalink
Implement __iter__ for wxList iterator classes
Browse files Browse the repository at this point in the history
This fixes being able to use these classes in for loops, for example.
Specifically it fixes the cmdproc tests with Python 3.13.1.
  • Loading branch information
swt2c committed Jan 24, 2025
1 parent 744801f commit 2adbeaa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions etgtools/tweaker_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,11 @@ class {ListClass}_iterator {{
if (PyErr_Occurred())
return NULL;
%End
PyObject* __iter__();
%MethodCode
return PyObject_SelfIter(sipSelf);
%End
}};
class {ListClass}
Expand Down

0 comments on commit 2adbeaa

Please sign in to comment.