Commit 41ba839
committed
updater: make UpdateListIter a proper iterator
Python iterators are required to implement an __iter__() that returns
self [1]. CPython doesn't check this consistently, but the requirement
is still there, so the existing code is buggy. Python 3.13 started
checking this in list comprehensions, resulting in exceptions being
thrown. Fix the bug by having __iter__() return self, as required by
the iterator protocol.
This worked on Python 3.13 and below, but broke in 3.13.1 [2].
[1]: https://docs.python.org/3/glossary.html#term-iterator
[2]: python/cpython#1282111 parent a3e4d17 commit 41ba839
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| |||
0 commit comments