Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changeset: Return a new op object by default when iterating
Reusing the same op object for each iteration can result in very weird behaviors because previously yielded op objects will get a surprise mutation. It is unclear why the code was written to reuse the same object. There was no comment, nor is there a commit message providing rationale (it has behaved this way since the very first commit). Perhaps the objects were reused to improve performance (fewer object allocations that need to be garbage collected). I do expect this change to reduce performance somewhat, but not enough to warrant reverting this commit.
- Loading branch information