{{ message }}
Commit c420cc5
Rebase range iterator
* Rebase range iterator __reduce__ to match CPython
range_iterator.__reduce__ (and longrange_iterator) returned the original
range plus the current index as pickle state; CPython returns the range
rebased to the current position with a None state. Rebase start by
index * step (clamped to the length) and emit None. __setstate__ is kept
so pickles carrying an integer state still load.
Assisted-by: Claude Code:claude-opus-4-8
* Add snippet test for range iterator __reduce__
Assert the rebased range and None state added in the previous commit. The
snippet runner executes it under both CPython and RustPython, so it also
cross-checks the representation against CPython.
Assisted-by: Claude Code:claude-opus-4-8
* Update extra_tests/snippets/builtin_range.py
---------
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>__reduce__ to match CPython (RustPython#8424)1 parent 6079ad0 commit c420cc5
2 files changed
Lines changed: 16 additions & 1 deletion

0 commit comments