[docs] [issue34085] doc Improve wording on classmethod/staticmethod

Andrés Delfino 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
components: Documentation
messages: 321390
nosy: adelfino, docs at python
priority: normal
severity: normal
status: open
title: doc Improve wording on classmethod/staticmethod
type: enhancement
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34085>
_______________________________________


More information about the docs mailing list