This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients eric.snow, ncoghlan
Date 2012-05-29.05:09:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338268199.99.0.762546999584.issue14942@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-05-29 05:10:00ncoghlansetrecipients: + ncoghlan, eric.snow
2012-05-29 05:09:59ncoghlansetmessageid: <1338268199.99.0.762546999584.issue14942@psf.upfronthosting.co.za>
2012-05-29 05:09:59ncoghlanlinkissue14942 messages
2012-05-29 05:09:59ncoghlancreate