Nick Coghlan <ncogh...@gmail.com> added the comment:

No, I mean no new C API at all. Anyone that wants to dynamically create a new 
type from C in 3.3 can already just write their own code to make the 
appropriate types.new_class() call:

http://docs.python.org/dev/library/types#types.new_class

A simple example, ignoring refcounting:

   types_mod = PyImport_ImportModule("types");
   new_class = PyObject_GetAttrString(types_mod, "new_class");
   new_type = PyObject_CallFunction(new_function, "s", "MyClass")

And assorted variations thereof using the different PyObject_GetAttr* and 
PyObject_Call* functions.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14942>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to