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 -
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 -