[Python-Dev] __slots__ for metatypes

Christian Tismer tismer@tismer.com
Sun, 02 Mar 2003 22:06:40 +0100

Hi Guido, all,

last year, I wrote a patch that allows meta-types to have
slots. You had no time to look into it, and I said
"take your time and wait until it is stable".

I have been using this for quite a while now,
and today I updated it for Python 2.3 .
The patch is very small and simple.
Essentially, it doesn't use a fixed offset into the
internal etype structure, but computed this based upon

This small patch also gives lots of flexibility to people,
who like to add extra stuff to their dynamic type objects.
(Well, I do this frequently)

It would be nice if we could add this small feature, soon.


Due to some SF bug, I had to submit this patch twice.

thanks a lot - chris
Christian Tismer             :^)   <mailto:tismer@tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/