Serhiy Storchaka added the comment:
This is how default values work in Python.
See the FAQ question:
https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> c
New submission from Florian Michaux :
Hello,
I don't know what's going on.
When using a for loop over multiple same instance creation, i got persistence
with instance attributes
Code example in attachement.
--
components: Interpreter Core
files: buggyclass.py
messages: 327051
nosy: F