Adding instance attributes to types

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • khughes@pacific.edu

    #1

    Adding instance attributes to types

    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?

Working...