Python 3.10 Bug
Just discovered a strange bug in Python. When you set a class initialization default parameter to an array, the array is in shared memory space. If initializing two objects one after another in code it is possible that their array will remain in shared memory space linking the two objects. python class Car(part_ids=[]) to fix don't do a default parameter instead detect if none and then create. python class Car(part_ids): self.part_ids = part_ids if part_ids is not None else [] Longer blog post on this coming soon.













