Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 91494d3

Browse files
committed
Issue #26576: Merge from 3.5
2 parents 43746c3 + 6cafece commit 91494d3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Doc/reference/compound_stmts.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,13 @@ are applied in nested fashion. For example, the following code ::
503503
@f2
504504
def func(): pass
505505

506-
is equivalent to ::
506+
is roughly equivalent to ::
507507

508508
def func(): pass
509509
func = f1(arg)(f2(func))
510510

511+
except that the original function is not temporarily bound to the name ``func``.
512+
511513
.. index::
512514
triple: default; parameter; value
513515
single: argument; function definition
@@ -638,14 +640,13 @@ Classes can also be decorated: just like when decorating functions, ::
638640
@f2
639641
class Foo: pass
640642

641-
is equivalent to ::
643+
is roughly equivalent to ::
642644

643645
class Foo: pass
644646
Foo = f1(arg)(f2(Foo))
645647

646648
The evaluation rules for the decorator expressions are the same as for function
647-
decorators. The result must be a class object, which is then bound to the class
648-
name.
649+
decorators. The result is then bound to the class name.
649650

650651
**Programmer's note:** Variables defined in the class definition are class
651652
attributes; they are shared by instances. Instance attributes can be set in a

0 commit comments

Comments
 (0)