diff -r 628bd1ebfa22 Doc/reference/compound_stmts.rst --- a/Doc/reference/compound_stmts.rst Fri Mar 18 03:03:10 2016 +0000 +++ b/Doc/reference/compound_stmts.rst Sat Mar 19 18:14:35 2016 +1100 @@ -503,11 +503,13 @@ @f2 def func(): pass -is equivalent to :: +is roughly equivalent to :: def func(): pass func = f1(arg)(f2(func)) +except that the original function is not temporarily bound to the name `func`. + .. index:: triple: default; parameter; value single: argument; function definition @@ -638,14 +640,13 @@ @f2 class Foo: pass -is equivalent to :: +is roughly equivalent to :: class Foo: pass Foo = f1(arg)(f2(Foo)) The evaluation rules for the decorator expressions are the same as for function -decorators. The result must be a class object, which is then bound to the class -name. +decorators. The result is then bound to the class name. **Programmer's note:** Variables defined in the class definition are class attributes; they are shared by instances. Instance attributes can be set in a