summaryrefslogtreecommitdiff
path: root/documentation.py
diff options
context:
space:
mode:
authormichele.simionato <devnull@localhost>2009-08-18 04:14:35 +0000
committermichele.simionato <devnull@localhost>2009-08-18 04:14:35 +0000
commitc8708c4276a7a06470226c85863ac958b574fcd8 (patch)
tree1067c04eef0aad00d4487601f06639c64f133658 /documentation.py
parent77098cfb3225adecffde1e76b147e9f7757ddd0c (diff)
downloadpython-decorator-git-c8708c4276a7a06470226c85863ac958b574fcd8.tar.gz
Decorator 3.1.1
Diffstat (limited to 'documentation.py')
-rw-r--r--documentation.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/documentation.py b/documentation.py
index 0005d9c..192ebfb 100644
--- a/documentation.py
+++ b/documentation.py
@@ -281,7 +281,7 @@ object which can be used as a decorator:
.. code-block:: python
>>> trace # doctest: +ELLIPSIS
- <functools.partial object at 0x...>
+ <function trace at 0x...>
Here is an example of usage:
@@ -837,8 +837,8 @@ you are unhappy with it, send me a patch!
"""
from __future__ import with_statement
import sys, threading, time, functools, inspect, itertools
-from functools import partial
from decorator import *
+from functools import partial
from setup import VERSION
today = time.strftime('%Y-%m-%d')
@@ -1056,5 +1056,14 @@ def fact(n): # this is not tail-recursive
if n == 0: return 1
return n * fact(n-1)
+
+def atest_for_pylons():
+ """
+ In version 3.1.0 decorator(caller) returned a nameless partial
+ object, thus breaking Pylons. That must not happen anymore.
+ >>> decorator(_memoize).__name__
+ '_memoize'
+ """
+
if __name__ == '__main__':
import doctest; doctest.testmod()