
New submission from bjonnh: in https://docs.python.org/3.5/howto/descriptor.html#static-methods-and-class-m... (same problem in all python 3.x documentations) There is this example where the return of f function is printed and there is already a print in the function: """
class E(object): def f(x): print(x) f = staticmethod(f)
print(E.f(3)) 3 print(E().f(3)) 3 """
It should probably be: """ def f(x): return(x) """ or """
E.f(3) 3 E().f(3) """
---------- assignee: docs@python components: Documentation messages: 241312 nosy: bjonnh, docs@python priority: normal severity: normal status: open title: Documentation error: Descriptors type: enhancement versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23984> _______________________________________