Sorry, I copied and pasted a wrong piece from shell at one part of the code: objct.Z=4 was in fact obj.Z=4 and it did refuse to accept Z (because it is not in __slots__). But the question remains: why the value of attribute A is not preserved during pickling and unpickling and what can be done about it, if anything?