Closed
Description
Feature
Our set.update
uses IterNext
for iterating given args and update the set contents (makes sense).
But this makes incompatibility with cpython.
cpython's implementation is converting given args to tuple and uses get_size
and get_item
.
As these method does not go through the iternext
, there is no exception if the set is mutated during update
.
Python Documentation
https://github.com/python/cpython/blob/3.10/Objects/setobject.c#L930-L941
Related test cases
test_set.py
test_merge_and_mutate