Nick Coghlan <ncogh...@gmail.com> added the comment:

Yep, the leading underscore and the fact you added it to a block of code that 
is skipped when Py_LIMITED_API is defined makes it OK to include the prototype 
in object.h.

However, I would suggest _PyType_CalculateMetaclass as the name - 
CalculateWinner is a bit vague without the specific context of calculating the 
metaclass.

On a broader point, I think there is an issue that needs to be brought up on 
python-dev: in light of PEP 3115, "type(name, bases, ns)" is no longer an 
entirely safe way to create dynamic types, as it bypasses __prepare__ methods. 
There should be an official way to access the full class building process, 
including correct invocation of __prepare__ methods (likely by making 
__build_class__ an official part of the language spec rather than a CPython 
implementation detail).

----------
assignee: docs@python -> 
nosy: +ncoghlan

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1294232>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to