Message241312
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)
""" |
|
Date |
User |
Action |
Args |
2015-04-17 04:42:08 | bjonnh | set | recipients:
+ bjonnh, docs@python |
2015-04-17 04:42:08 | bjonnh | set | messageid: <1429245728.01.0.810263114275.issue23984@psf.upfronthosting.co.za> |
2015-04-17 04:42:07 | bjonnh | link | issue23984 messages |
2015-04-17 04:42:07 | bjonnh | create | |
|