class attributes and inner classes in C extensions

  • Thread starter harold fellermann
  • Start date
H

harold fellermann

Hello,

I just posted this question with a wrong subject... So here again with
a better one.

I am working on a C extension module that implements a bunch of
classes. Everything
works fine so far, but I cannot find any way to implement class
attributes or inner
classes. Consider you have the following lines of Python :

class Foo :
class Bar :
pass

spam = "foobar"

How can this class be translated to a C extension? Is there anything
comparable to
PyMethodDef that can be used for other attributes than functions?

Thanks for your help,

- 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,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top