mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
15 lines
236 B
Python
15 lines
236 B
Python
ls = [1, 2, 3]
|
|
|
|
i = iter(ls)
|
|
assert i.__next__() == 1
|
|
assert i.__next__() == 2
|
|
assert next(i) == 3
|
|
|
|
assert next(i, "w00t") == "w00t"
|
|
|
|
s = "你好"
|
|
i = iter(s)
|
|
i.__setstate__(1)
|
|
assert i.__next__() == "好"
|
|
assert i.__reduce__()[2] == 2
|