Multiple inheritance and __slots__

Michele Simionato michele.simionato at gmail.com
Thu Dec 14 09:29:32 EST 2006


jm.suresh at no.spam.gmail.com wrote:
> OK. But is there any other way to do what __slots__ does as a 'side
> effect' i.e. forcing me to think about the list of attributes my class
> is going to have upfront and raising error whenever I violate it. IMHO
> this is a very good thing to have even if one does not care about
> memory.

See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252158 (how
to freeze Python classes)

  Michele Simionato




More information about the Python-list mailing list