[docs] [issue34085] doc Improve wording on classmethod/staticmethod
report at bugs.python.org
Tue Jul 10 12:33:43 EDT 2018
New submission from Andrés Delfino <adelfino at gmail.com>:
1. The classmethod definition reads:
The @classmethod form is a function decorator – see the description of function definitions in Function definitions for details.
It can be called either on the class (such as C.f()) or on an instance (such as C().f())
The second paragraph seems like talking about the classmethod function instead of a class method. The same goes for staticmethod.
2. The staticmethod definition reads:
It can be called either on the class (such as C.f()) or on an instance (such as C().f()). The instance is ignored except for its class.
"The instance is ignored except for its class." seems to have been copied from classmethod definition.
3. There is redundant text:
"see the description of function definitions in Function definitions"
"consult the documentation on the standard type hierarchy in The standard type hierarchy"
PR fixes this.
assignee: docs at python
nosy: adelfino, docs at python
title: doc Improve wording on classmethod/staticmethod
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8
Python tracker <report at bugs.python.org>
More information about the docs