summaryrefslogtreecommitdiff
path: root/documentation3.py
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2015-03-16 13:26:02 +0100
committerMichele Simionato <michele.simionato@gmail.com>2015-03-16 13:26:02 +0100
commitcf1b025a53dc21e09327dfd28dcfb00befff30c1 (patch)
tree1cf091454ba08cfe601848b9a8bab79d9a281082 /documentation3.py
parentb68244d7e84dbc9c4d805c79d9a644e3526146ce (diff)
downloadpython-decorator-git-cf1b025a53dc21e09327dfd28dcfb00befff30c1.tar.gz
Initial travis support
Diffstat (limited to 'documentation3.py')
-rw-r--r--documentation3.py12
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)