[Python-Dev] Adding types.build_class for 3.3

Terry Reedy tjreedy at udel.edu
Fri May 11 16:16:42 CEST 2012


On 5/11/2012 2:21 AM, Mark Shannon wrote:
> Nick Coghlan wrote:

>> The question now moves to the implementation strategy - whether we
>> redirect to the C machinery as originally proposed (either via
>> __build_class__ or a new _types module) or just reimplement the
>> algorithm in pure Python. The latter is actually quite an appealing
>> concept, since it becomes a cross-check on the native C version.

I assume types.new_class would eventually call type(). This would make 
it available to any implementation with a conforming type().

> +1 to a pure Python version.

Since new_class would be used rarely and not in inner loops, and (if I 
understand) should mostly contain branching logic rather than looping, 
speed hardly seems an issue.

---
Terry Jan Reedy



More information about the Python-Dev mailing list