How to extend inner classes?

H

hfellerm

Hi all,

I try to implement a C extension module that uses inner classes. The
structure of the corresponding python code is the following:

class PeriodicGrid :
class Pos :
# [...]

class NofluxGrid :
class Pos :
# [...]

I wrote the PyTypeObjects for PeriodicGrid, NofluxGrid, PeriodicPos, and
NofluxPos. Now I want to add each PosType to the appropriate Grid's
dictionary, so that I can write something like

in my python program. What is the general way to add class members
(instead of instance members which is done by a PyMemberDef array) to the
PyTypeObject?

Any help appreciated,

- harold -
 

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

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top