Logged In: YES user_id=1310227 I'm posting a proposed patch with a test case covering this bug (shouldn't all standard library modules have tests?). It may introduce performance lost, as it removes __slots__ definition.
Logged In: YES user_id=1326842 This is a bug in your code, you have to call the base class's __init__ method. The error does not occur during the object creation, but later when repr(obj) fails due to incorrect initialization.