[docs] [issue17352] Be clear that __prepare__ must be declared as a class method
report at bugs.python.org
Tue Mar 3 13:36:22 CET 2015
Nick Coghlan added the comment:
__new__ is a little weird - it's actually special cased as a staticmethod.
Your questions is still valid, though.
For existing versions, documenting the requirement is the only option.
For future versions, we could conceivably implement a "decorate it if it isn't already decorated" fallback, but for backwards compatibility we'd have to avoid double-decorating explicitly decorated implementations.
Python tracker <report at bugs.python.org>
More information about the docs