Message160466
Here is my first attempt at creating a pure Python version of the operator.build_class function (in my previous patch) as types.new_class.
The three added functions (two private and one public) correspond to the following functions in my previous patch:
types.new_class -> operator.build_class
types._prepare_ns -> prepare_namespace in typeobject.c
types._calculate_mcls -> calculate_metaclass in typeobject.c (currently _PyType_CalculateMetaclass)
(In Python these functions are quite short, so they may be merged. But this separation may be better for documentation purposes...)
The tests are mostly the same as in my previous patch. |
|
Date |
User |
Action |
Args |
2012-05-12 09:49:17 | daniel.urban | set | recipients:
+ daniel.urban, ncoghlan, eric.araujo, r.david.murray |
2012-05-12 09:49:17 | daniel.urban | set | messageid: <1336816157.89.0.455184861234.issue14588@psf.upfronthosting.co.za> |
2012-05-12 09:49:17 | daniel.urban | link | issue14588 messages |
2012-05-12 09:49:17 | daniel.urban | create | |
|