Message161851
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. |
|
Date |
User |
Action |
Args |
2012-05-29 05:10:00 | ncoghlan | set | recipients:
+ ncoghlan, eric.snow |
2012-05-29 05:09:59 | ncoghlan | set | messageid: <1338268199.99.0.762546999584.issue14942@psf.upfronthosting.co.za> |
2012-05-29 05:09:59 | ncoghlan | link | issue14942 messages |
2012-05-29 05:09:59 | ncoghlan | create | |
|