Adding instance attributes to types

K

khughes

I have written a C module which implements a new Python type, and
implemented data attributes for the type using PyGetSetDef/tp_getset.
However, I want to allow instances of this type to have additional data
attributes which also have get() and set() functions. (This might be
better suited to use inherited classes or types, but the differences
would be very minor). Is this possible?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top