Re: defining class and subclass in C

2012-01-15 Thread Stefan Behnel
Daniel Franke, 14.01.2012 22:15: > I spent some days and nights on this already and my google-fu is running out. > I'd like to implement the equivalent of this Python code in a C-extension: > > >>> class A(object): > pass > >>> class B(A): > pass > >>> A > > >>> B > > >>> B.__bases__

Re: defining class and subclass in C

2012-01-14 Thread Tim Roberts
Daniel Franke wrote: > >I'd like to implement the equivalent of this Python code in a C-extension: > class A(object): >... pass class B(A): >... pass A > B > B.__bases__ >(,) > >However, loading my C-code (quoted below) I get: > import ca ca > ca.ca > > >H

Re: defining class and subclass in C

2012-01-14 Thread Daniel Franke
On Saturday 14 January 2012 22:15:36 Daniel Franke wrote: > Here I'd expect "" instead?! And I never managed a proper > subclass :| Found an explanation on type/class at [1]: "he difference between the two is whether the C-level type instance structure is flagged as having been allocated on the

defining class and subclass in C

2012-01-14 Thread Daniel Franke
Hi all. I spent some days and nights on this already and my google-fu is running out. I'd like to implement the equivalent of this Python code in a C-extension: >>> class A(object): ... pass >>> class B(A): ... pass >>> A >>> B >>> B.__bases__ (,) However, loading my C-code (quoted below)