[Cython] Metaclasses to generate cdef'ed Classes

c. valmynd at gmail.com
Fri May 25 12:53:08 CEST 2012

I make excessive use of Meta Classes and I would like to be
able to use them with Classes that use the cclass Annotation.

Well I don't think it is impossible to do, althrough of cause
I am aware that there are many issues with a higher priority right now.
Here are some ideas of how this could be accomplished:

- evaluate cdef-Classes which are using a Metaclass before any other classes
- create temporary pyd and pyx files for any cdef-class that uses cdef-metaclasses
- those temporary classes need to be re-evaluated if anything changes
  in the original


- Once the Extension Module is built, there would be no need to do
  process the creation/manipulation via metaclasses, thus reduce startup
  time for application
- Have all the benefits of cdef-Classes, like lower memory footprint,
  when there might be hundreds of those classes with lots of data in them
- Have all the benefits of python beeing both very dynamic and flexible
  and simple to use 

What do you think?

Btw., Thank you all for this great Project


trac ticket: http://trac.cython.org/cython_trac/ticket/777

More information about the cython-devel mailing list