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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com