Is set.copy() atomic in Python?
Is set.copy() atomic in Python? Question: Suppose we have an instance variable in a class. class MyClass(object): def __init__(): self.set1 = set() Is the following operation atomic? set_shallow_copy = self.set1.copy() I’ve tried to search around, but the only information I’ve found is that reading instance variables are atomic. (Edit) I tried to decompile the bytecode …