You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
20 lines
384 B
Python
20 lines
384 B
Python
# From 3.6 _collections.abc.py
|
|
# Bug was try/execpt parsing detection since 3.6 removes
|
|
# a JUMP_FORWARD from earlier 3.xs.
|
|
# This could also get confused with try/else.
|
|
|
|
# RUNNABLE!
|
|
def iter(self):
|
|
i = 0
|
|
try:
|
|
while True:
|
|
v = self[i]
|
|
yield v
|
|
i += 1
|
|
except IndexError:
|
|
return
|
|
|
|
|
|
A = [10, 20, 30]
|
|
assert list(iter(A)) == A
|