diff options
Diffstat (limited to 'documentation3.py')
| -rw-r--r-- | documentation3.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/documentation3.py b/documentation3.py index c7be177..5be0cca 100644 --- a/documentation3.py +++ b/documentation3.py @@ -774,9 +774,8 @@ you will get a ``NameError``: def f(_func_): return _call_(_func_, _func_) -Finally, the implementation is such that the decorated function contains -a *copy* of the original function dictionary -(``vars(decorated_f) is not vars(f)``): +Finally, the implementation is such that the decorated function shares +the original function dictionary: .. code-block:: python @@ -789,8 +788,8 @@ a *copy* of the original function dictionary >>> traced_f.attr1 'something' >>> traced_f.attr2 = "something different" # setting attr - >>> f.attr2 # the original attribute did not change - 'something else' + >>> f.attr2 # the original attribute did change, works in Python 3.4 + 'something different' Compatibility notes --------------------------------------------------------------- @@ -1211,4 +1210,5 @@ def hello(user): if __name__ == '__main__': import doctest - doctest.testmod() + err = doctest.testmod()[0] + sys.exit(err) |
