[Python-Dev] Python interface to attribute descriptors

Paul F Dubois paul@pfdubois.com
Wed, 13 Nov 2002 10:09:17 -0800


Like a few other people before me, I was trying to understand and
exploit attribute descriptors and in so doing encountered two facts:

a. The C-API document doesn't document these functions beyond giving
their signatures. This is even true in the development version, as far
as I can tell.

b. There is no Python API; you can define a class with some methods with
the right names and signatures and it will come tantalizingly close to
working for some purposes but sooner or later you find that you just
aren't allowed to play as a first-class citizen from Python.

Has anyone already done either of these tasks?

On the bright side, I did manage to make a metaclass without my head
going critical. Smoke came out my ears, though.