From cf72358963e04babb95d31cfccb41edc16d5f395 Mon Sep 17 00:00:00 2001 From: shubham Date: Sat, 8 Apr 2017 00:07:47 +0530 Subject: [PATCH 1/3] fixing the doc for static functions Issue#23984 --- Doc/howto/descriptor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index c2bf473e1ff9ea..637cf30b55a7ce 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -359,7 +359,7 @@ calls are unexciting:: >>> class E(object): ... def f(x): - ... print(x) + ... return(x) ... f = staticmethod(f) ... >>> print(E.f(3)) From 7e29c179763e865d8ff3106d70867d86f1477287 Mon Sep 17 00:00:00 2001 From: shubham Date: Sat, 8 Apr 2017 00:34:23 +0530 Subject: [PATCH 2/3] removing parenthesis --- Doc/howto/descriptor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 637cf30b55a7ce..e0b3257d0b31ce 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -359,7 +359,7 @@ calls are unexciting:: >>> class E(object): ... def f(x): - ... return(x) + ... return x ... f = staticmethod(f) ... >>> print(E.f(3)) From dfda1c6d488e39e18a8ceaf92a5fd76267c41f0c Mon Sep 17 00:00:00 2001 From: shubham Date: Wed, 12 Apr 2017 22:35:39 +0530 Subject: [PATCH 3/3] removing return from the func and print from the func call --- Doc/howto/descriptor.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index e0b3257d0b31ce..fb4b59b2b5cc69 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -359,12 +359,12 @@ calls are unexciting:: >>> class E(object): ... def f(x): - ... return x + ... print(x) ... f = staticmethod(f) ... - >>> print(E.f(3)) + >>> E.f(3) 3 - >>> print(E().f(3)) + >>> E().f(3) 3 Using the non-data descriptor protocol, a pure Python version of