This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bjonnh
Recipients bjonnh, docs@python
Date 2015-04-17.04:42:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429245728.01.0.810263114275.issue23984@psf.upfronthosting.co.za>
In-reply-to
Content
in
https://docs.python.org/3.5/howto/descriptor.html#static-methods-and-class-methods

(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)
"""
History
Date User Action Args
2015-04-17 04:42:08bjonnhsetrecipients: + bjonnh, docs@python
2015-04-17 04:42:08bjonnhsetmessageid: <1429245728.01.0.810263114275.issue23984@psf.upfronthosting.co.za>
2015-04-17 04:42:07bjonnhlinkissue23984 messages
2015-04-17 04:42:07bjonnhcreate