Berker Peksag added the comment:
This is a duplicate of issue 15243.
--
nosy: +berker.peksag
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Misleading documentation for __prepare__
___
Python tracker
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: -ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17352
___
___
Python-bugs-list
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
Ethan Furman added the comment:
Should __prepare__ be special-cased as a classmethod, like __new__ is? Is
there any reason to ever have __prepare__ /not/ be a classmethod?
--
___
Python tracker rep...@bugs.python.org
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17352
___
___
Python-bugs-list
Changes by Georg Brandl ge...@python.org:
--
assignee: - docs@python
components: +Documentation
nosy: +docs@python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17352
___
Nick Coghlan added the comment:
Class method, not static method (super() breaks if you declare it as a static
method)
--
title: Be clear that __prepare__ must be declared as a static method - Be
clear that __prepare__ must be declared as a class method