This article is a reference because this cost me about an hour to debug:
foo = 
a = test()
b = test()
When you define the class (test, in this case), any class properties will be instanciated on class-definition and not on object instanciation. Therefore, when you create multiple copies of a class, they will have the same actual object as class properties. You should instanciate those attributes in the init-method.
For this reason, the following code will generate output, even though it looks like it probably shouldn’t, because not a single object was created:
foo = [f()]
This will obviously not concern you, if you are – as you should – using immutable objects.