This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mwh
Date 2005-03-30.17:09:14
SpamBayes Score
Marked as misclassified
This is a first, rough cut at allowing subclasses of variable length 
types to have __slots__ of all flavours, not just __dict__.

The motivation is trying to understand and document what's going on 
in typeobject.c, and the less special cases knocking around the 

This patch also allows instances of such classes to be weakly 

What is missing: tests, lots of tests, documentation.  Also, the code 
is a bit hackish at various points; a degree of clean up can certainly 
be acheived.

Also, I think my code probably fails to cope with code like:

class A(str):
 pass # implicitly adds __dict__, __weakref__
class B(A):
 __slots__ = ["a", "b"]

b = B()
b.c = 1

Hmm, yes.  Oh well, no time to fix today (I don't think it's that big a 
Date User Action Args
2007-08-23 15:42:30adminlinkissue1173475 messages
2007-08-23 15:42:30admincreate