summaryrefslogtreecommitdiff
path: root/src/tests/documentation.py
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2021-03-31 07:12:08 +0200
committerMichele Simionato <michele.simionato@gmail.com>2021-03-31 07:12:08 +0200
commit3bbdb6dd1fb04c8b8379c751e5e0e0afe04c1d3f (patch)
tree00e776f332d4b654b42b3be42b88e75220463702 /src/tests/documentation.py
parent95132174ed34089ec620e928597fb8f4d2dd0e92 (diff)
downloadpython-decorator-git-3bbdb6dd1fb04c8b8379c751e5e0e0afe04c1d3f.tar.gz
Not using the FunctionMaker in ContextManager
Diffstat (limited to 'src/tests/documentation.py')
-rw-r--r--src/tests/documentation.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/tests/documentation.py b/src/tests/documentation.py
index b827c1a..ec04c6d 100644
--- a/src/tests/documentation.py
+++ b/src/tests/documentation.py
@@ -1282,19 +1282,6 @@ notice that lately I have come to believe that decorating functions with
keyword arguments is not such a good idea, and you may want not to do
that.
-On a similar note, there is a restriction on argument names. For instance,
-if you name an argument ``_call_`` or ``_func_``, you will get a ``NameError``:
-
-```python
->>> @trace
-... def f(_func_): print(f)
-...
-Traceback (most recent call last):
- ...
-NameError: _func_ is overridden in
-def f(_func_):
- return _call_(_func_, _func_)
-
Finally, the implementation is such that the decorated function makes
a (shallow) copy of the original function dictionary: