summaryrefslogtreecommitdiff
path: root/documentation.pdf
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2015-07-24 10:10:13 +0200
committerMichele Simionato <michele.simionato@gmail.com>2015-07-24 10:10:13 +0200
commit753173a95aaf26837b3ede284f007fa3b591c598 (patch)
tree736a7b97ec4bc7b932bfc3469edbea4088007b78 /documentation.pdf
parent55f28695e817fd7eac8870330843b3dff8f49eaa (diff)
downloadpython-decorator-git-753173a95aaf26837b3ede284f007fa3b591c598.tar.gz
Improvements to the docs
Diffstat (limited to 'documentation.pdf')
-rw-r--r--documentation.pdf1035
1 files changed, 520 insertions, 515 deletions
diff --git a/documentation.pdf b/documentation.pdf
index fe0c2ec..564a0e1 100644
--- a/documentation.pdf
+++ b/documentation.pdf
@@ -31,46 +31,46 @@ endobj
<< /Border [ 0 0 0 ] /Contents () /Dest [ 52 0 R /XYZ 62.69291 582.0236 0 ] /Rect [ 527.0227 542.7736 532.5827 554.7736 ] /Subtype /Link /Type /Annot >>
endobj
11 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 52 0 R /XYZ 62.69291 369.0236 0 ] /Rect [ 62.69291 524.0236 182.7229 536.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 52 0 R /XYZ 62.69291 357.0236 0 ] /Rect [ 62.69291 524.0236 182.7229 536.0236 ] /Subtype /Link /Type /Annot >>
endobj
12 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 52 0 R /XYZ 62.69291 369.0236 0 ] /Rect [ 527.0227 524.7736 532.5827 536.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 52 0 R /XYZ 62.69291 357.0236 0 ] /Rect [ 527.0227 524.7736 532.5827 536.7736 ] /Subtype /Link /Type /Annot >>
endobj
13 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 57 0 R /XYZ 62.69291 765.0236 0 ] /Rect [ 62.69291 506.0236 114.3629 518.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 57 0 R /XYZ 62.69291 729.0236 0 ] /Rect [ 62.69291 506.0236 114.3629 518.0236 ] /Subtype /Link /Type /Annot >>
endobj
14 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 57 0 R /XYZ 62.69291 765.0236 0 ] /Rect [ 527.0227 506.7736 532.5827 518.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 57 0 R /XYZ 62.69291 729.0236 0 ] /Rect [ 527.0227 506.7736 532.5827 518.7736 ] /Subtype /Link /Type /Annot >>
endobj
15 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 57 0 R /XYZ 62.69291 528.0236 0 ] /Rect [ 62.69291 488.0236 183.2629 500.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 57 0 R /XYZ 62.69291 492.0236 0 ] /Rect [ 62.69291 488.0236 183.2629 500.0236 ] /Subtype /Link /Type /Annot >>
endobj
16 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 57 0 R /XYZ 62.69291 528.0236 0 ] /Rect [ 527.0227 488.7736 532.5827 500.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 57 0 R /XYZ 62.69291 492.0236 0 ] /Rect [ 527.0227 488.7736 532.5827 500.7736 ] /Subtype /Link /Type /Annot >>
endobj
17 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 58 0 R /XYZ 62.69291 469.4236 0 ] /Rect [ 62.69291 470.0236 122.1429 482.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 58 0 R /XYZ 62.69291 433.4236 0 ] /Rect [ 62.69291 470.0236 122.1429 482.0236 ] /Subtype /Link /Type /Annot >>
endobj
18 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 58 0 R /XYZ 62.69291 469.4236 0 ] /Rect [ 527.0227 470.7736 532.5827 482.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 58 0 R /XYZ 62.69291 433.4236 0 ] /Rect [ 527.0227 470.7736 532.5827 482.7736 ] /Subtype /Link /Type /Annot >>
endobj
19 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 59 0 R /XYZ 62.69291 492.6236 0 ] /Rect [ 62.69291 452.0236 69.91291 464.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 59 0 R /XYZ 62.69291 435.4236 0 ] /Rect [ 62.69291 452.0236 69.91291 464.0236 ] /Subtype /Link /Type /Annot >>
endobj
20 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 59 0 R /XYZ 62.69291 492.6236 0 ] /Rect [ 72.69291 452.0236 102.6929 464.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 59 0 R /XYZ 62.69291 435.4236 0 ] /Rect [ 72.69291 452.0236 102.6929 464.0236 ] /Subtype /Link /Type /Annot >>
endobj
21 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 59 0 R /XYZ 62.69291 492.6236 0 ] /Rect [ 108.6929 452.0236 154.8129 464.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 59 0 R /XYZ 62.69291 435.4236 0 ] /Rect [ 108.6929 452.0236 154.8129 464.0236 ] /Subtype /Link /Type /Annot >>
endobj
22 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 59 0 R /XYZ 62.69291 492.6236 0 ] /Rect [ 527.0227 452.7736 532.5827 464.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 59 0 R /XYZ 62.69291 435.4236 0 ] /Rect [ 527.0227 452.7736 532.5827 464.7736 ] /Subtype /Link /Type /Annot >>
endobj
23 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 61 0 R /XYZ 62.69291 631.8236 0 ] /Rect [ 62.69291 434.0236 164.3629 446.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 61 0 R /XYZ 62.69291 566.6236 0 ] /Rect [ 62.69291 434.0236 164.3629 446.0236 ] /Subtype /Link /Type /Annot >>
endobj
24 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 61 0 R /XYZ 62.69291 631.8236 0 ] /Rect [ 527.0227 434.7736 532.5827 446.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 61 0 R /XYZ 62.69291 566.6236 0 ] /Rect [ 527.0227 434.7736 532.5827 446.7736 ] /Subtype /Link /Type /Annot >>
endobj
25 0 obj
<< /Border [ 0 0 0 ] /Contents () /Dest [ 62 0 R /XYZ 62.69291 765.0236 0 ] /Rect [ 62.69291 416.0236 176.6929 428.0236 ] /Subtype /Link /Type /Annot >>
@@ -127,43 +127,43 @@ endobj
<< /Border [ 0 0 0 ] /Contents () /Dest [ 70 0 R /XYZ 62.69291 445.4236 0 ] /Rect [ 521.4627 290.7736 532.5827 302.7736 ] /Subtype /Link /Type /Annot >>
endobj
43 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 72 0 R /XYZ 62.69291 227.0236 0 ] /Rect [ 62.69291 272.0236 251.0829 284.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 73 0 R /XYZ 62.69291 171.0236 0 ] /Rect [ 62.69291 272.0236 251.0829 284.0236 ] /Subtype /Link /Type /Annot >>
endobj
44 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 72 0 R /XYZ 62.69291 227.0236 0 ] /Rect [ 521.4627 272.7736 532.5827 284.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 73 0 R /XYZ 62.69291 171.0236 0 ] /Rect [ 521.4627 272.7736 532.5827 284.7736 ] /Subtype /Link /Type /Annot >>
endobj
45 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 75 0 R /XYZ 62.69291 348.6236 0 ] /Rect [ 62.69291 254.0236 174.3929 266.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 77 0 R /XYZ 62.69291 276.6236 0 ] /Rect [ 62.69291 254.0236 174.3929 266.0236 ] /Subtype /Link /Type /Annot >>
endobj
46 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 75 0 R /XYZ 62.69291 348.6236 0 ] /Rect [ 521.4627 254.7736 532.5827 266.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 77 0 R /XYZ 62.69291 276.6236 0 ] /Rect [ 521.4627 254.7736 532.5827 266.7736 ] /Subtype /Link /Type /Annot >>
endobj
47 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 78 0 R /XYZ 62.69291 458.6236 0 ] /Rect [ 62.69291 236.0236 106.0329 248.0236 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 79 0 R /XYZ 62.69291 396.6236 0 ] /Rect [ 62.69291 236.0236 106.0329 248.0236 ] /Subtype /Link /Type /Annot >>
endobj
48 0 obj
-<< /Border [ 0 0 0 ] /Contents () /Dest [ 78 0 R /XYZ 62.69291 458.6236 0 ] /Rect [ 521.4627 236.7736 532.5827 248.7736 ] /Subtype /Link /Type /Annot >>
+<< /Border [ 0 0 0 ] /Contents () /Dest [ 79 0 R /XYZ 62.69291 396.6236 0 ] /Rect [ 521.4627 236.7736 532.5827 248.7736 ] /Subtype /Link /Type /Annot >>
endobj
49 0 obj
<< /Annots [ 5 0 R 6 0 R 7 0 R 8 0 R 9 0 R 10 0 R 11 0 R 12 0 R 13 0 R 14 0 R
15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R
25 0 R 26 0 R 27 0 R 28 0 R 29 0 R 30 0 R 31 0 R 32 0 R 33 0 R 34 0 R
35 0 R 36 0 R 37 0 R 38 0 R 39 0 R 40 0 R 41 0 R 42 0 R 43 0 R 44 0 R
- 45 0 R 46 0 R 47 0 R 48 0 R ] /Contents 102 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
+ 45 0 R 46 0 R 47 0 R 48 0 R ] /Contents 103 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
/Trans << >> /Type /Page >>
endobj
50 0 obj
<< /BaseFont /Helvetica-Oblique /Encoding /WinAnsiEncoding /Name /F4 /Subtype /Type1 /Type /Font >>
endobj
51 0 obj
-<< /A << /S /URI /Type /Action /URI (http://pythonwheels.com/) >> /Border [ 0 0 0 ] /Rect [ 62.69291 630.0236 89.4624 642.0236 ] /Subtype /Link /Type /Annot >>
+<< /A << /S /URI /Type /Action /URI (http://pythonwheels.com/) >> /Border [ 0 0 0 ] /Rect [ 106.4829 630.0236 133.6029 642.0236 ] /Subtype /Link /Type /Annot >>
endobj
52 0 obj
-<< /Annots [ 51 0 R ] /Contents 103 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
+<< /Annots [ 51 0 R ] /Contents 104 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
/Trans << >> /Type /Page >>
endobj
53 0 obj
-<< /A << /S /URI /Type /Action /URI (http://www.python.org/moin/PythonDecoratorLibrary) >> /Border [ 0 0 0 ] /Rect [ 219.6428 453.0236 449.1728 465.0236 ] /Subtype /Link /Type /Annot >>
+<< /A << /S /URI /Type /Action /URI (http://www.python.org/moin/PythonDecoratorLibrary) >> /Border [ 0 0 0 ] /Rect [ 219.6428 417.0236 449.1728 429.0236 ] /Subtype /Link /Type /Annot >>
endobj
54 0 obj
<< /BaseFont /Courier-Bold /Encoding /WinAnsiEncoding /Name /F5 /Subtype /Type1 /Type /Font >>
@@ -172,164 +172,167 @@ endobj
<< /BaseFont /Courier-Oblique /Encoding /WinAnsiEncoding /Name /F6 /Subtype /Type1 /Type /Font >>
endobj
56 0 obj
-<< /A << /S /URI /Type /Action /URI (https://docs.python.org/3/library/functools.html#functools.update_wrapper) >> /Border [ 0 0 0 ] /Rect [ 151.0486 243.8236 267.91 255.8236 ] /Subtype /Link /Type /Annot >>
+<< /A << /S /URI /Type /Action /URI (https://docs.python.org/3/library/functools.html#functools.update_wrapper) >> /Border [ 0 0 0 ] /Rect [ 143.5057 177.8236 261.1214 189.8236 ] /Subtype /Link /Type /Annot >>
endobj
57 0 obj
-<< /Annots [ 53 0 R 56 0 R ] /Contents 104 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
+<< /Annots [ 53 0 R 56 0 R ] /Contents 105 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
/Trans << >> /Type /Page >>
endobj
58 0 obj
-<< /Contents 105 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 106 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
59 0 obj
-<< /Contents 106 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 107 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
60 0 obj
-<< /A << /S /URI /Type /Action /URI (http://www.python.org/dev/peps/pep-3107/) >> /Border [ 0 0 0 ] /Rect [ 231.6368 592.8236 323.0741 604.8236 ] /Subtype /Link /Type /Annot >>
+<< /A << /S /URI /Type /Action /URI (http://www.python.org/dev/peps/pep-3107/) >> /Border [ 0 0 0 ] /Rect [ 231.6368 527.6236 323.0741 539.6236 ] /Subtype /Link /Type /Annot >>
endobj
61 0 obj
-<< /Annots [ 60 0 R ] /Contents 107 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
+<< /Annots [ 60 0 R ] /Contents 108 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
/Trans << >> /Type /Page >>
endobj
62 0 obj
-<< /Contents 108 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 109 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
63 0 obj
-<< /Contents 109 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 110 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
64 0 obj
-<< /Contents 110 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 111 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
65 0 obj
-<< /Contents 111 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 112 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
66 0 obj
<< /A << /S /URI /Type /Action /URI (http://bugs.python.org/issue1764286) >> /Border [ 0 0 0 ] /Rect [ 133.3162 345.2236 172.2473 357.2236 ] /Subtype /Link /Type /Annot >>
endobj
67 0 obj
-<< /Annots [ 66 0 R ] /Contents 112 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
+<< /Annots [ 66 0 R ] /Contents 113 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
/Trans << >> /Type /Page >>
endobj
68 0 obj
<< /A << /S /URI /Type /Action /URI (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691) >> /Border [ 0 0 0 ] /Rect [ 62.69291 515.8236 363.4029 527.8236 ] /Subtype /Link /Type /Annot >>
endobj
69 0 obj
-<< /Annots [ 68 0 R ] /Contents 113 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
+<< /Annots [ 68 0 R ] /Contents 114 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
/Trans << >> /Type /Page >>
endobj
70 0 obj
-<< /Contents 114 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 115 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
71 0 obj
-<< /Contents 115 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 116 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
72 0 obj
-<< /Contents 116 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
- /Type /Page >>
+<< /A << /S /URI /Type /Action /URI (http://www.python.org/2.3/mro.html) >> /Border [ 0 0 0 ] /Rect [ 330.4156 195.0236 355.3935 207.0236 ] /Subtype /Link /Type /Annot >>
endobj
73 0 obj
-<< /Contents 117 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
- /Type /Page >>
+<< /Annots [ 72 0 R ] /Contents 117 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
+ /Trans << >> /Type /Page >>
endobj
74 0 obj
-<< /Contents 118 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
- /Type /Page >>
+<< /A << /S /URI /Type /Action /URI (http://www.python.org/2.3/mro.html) >> /Border [ 0 0 0 ] /Rect [ 284.1108 618.6236 309.8555 630.6236 ] /Subtype /Link /Type /Annot >>
endobj
75 0 obj
-<< /Contents 119 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
- /Type /Page >>
+<< /Annots [ 74 0 R ] /Contents 118 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
+ /Trans << >> /Type /Page >>
endobj
76 0 obj
-<< /A << /S /URI /Type /Action /URI (http://www.python.org/dev/peps/pep-0362) >> /Border [ 0 0 0 ] /Rect [ 301.1597 248.2236 317.8397 260.2236 ] /Subtype /Link /Type /Annot >>
+<< /Contents 119 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+ /Type /Page >>
endobj
77 0 obj
-<< /Annots [ 76 0 R ] /Contents 120 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0
- /Trans << >> /Type /Page >>
+<< /Contents 120 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+ /Type /Page >>
endobj
78 0 obj
-<< /Contents 121 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 101 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+<< /Contents 121 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
/Type /Page >>
endobj
79 0 obj
-<< /Outlines 81 0 R /PageLabels 122 0 R /PageMode /UseNone /Pages 101 0 R /Type /Catalog >>
+<< /Contents 122 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 102 0 R /Resources << /Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> /Rotate 0 /Trans << >>
+ /Type /Page >>
endobj
80 0 obj
-<< /Author (Michele Simionato) /CreationDate (D:20150724083859-01'00') /Creator (\(unspecified\)) /Keywords () /Producer (ReportLab PDF Library - www.reportlab.com) /Subject (\(unspecified\))
- /Title (The decorator module) >>
+<< /Outlines 82 0 R /PageLabels 123 0 R /PageMode /UseNone /Pages 102 0 R /Type /Catalog >>
endobj
81 0 obj
-<< /Count 19 /First 82 0 R /Last 100 0 R /Type /Outlines >>
+<< /Author (Michele Simionato) /CreationDate (D:20150724100923-01'00') /Creator (\(unspecified\)) /Keywords () /Producer (ReportLab PDF Library - www.reportlab.com) /Subject (\(unspecified\))
+ /Title (The decorator module) >>
endobj
82 0 obj
-<< /Dest [ 52 0 R /XYZ 62.69291 765.0236 0 ] /Next 83 0 R /Parent 81 0 R /Title (Introduction) >>
+<< /Count 19 /First 83 0 R /Last 101 0 R /Type /Outlines >>
endobj
83 0 obj
-<< /Dest [ 52 0 R /XYZ 62.69291 582.0236 0 ] /Next 84 0 R /Parent 81 0 R /Prev 82 0 R /Title (What's new) >>
+<< /Dest [ 52 0 R /XYZ 62.69291 765.0236 0 ] /Next 84 0 R /Parent 82 0 R /Title (Introduction) >>
endobj
84 0 obj
-<< /Dest [ 52 0 R /XYZ 62.69291 369.0236 0 ] /Next 85 0 R /Parent 81 0 R /Prev 83 0 R /Title (Usefulness of decorators) >>
+<< /Dest [ 52 0 R /XYZ 62.69291 582.0236 0 ] /Next 85 0 R /Parent 82 0 R /Prev 83 0 R /Title (What's new) >>
endobj
85 0 obj
-<< /Dest [ 57 0 R /XYZ 62.69291 765.0236 0 ] /Next 86 0 R /Parent 81 0 R /Prev 84 0 R /Title (Definitions) >>
+<< /Dest [ 52 0 R /XYZ 62.69291 357.0236 0 ] /Next 86 0 R /Parent 82 0 R /Prev 84 0 R /Title (Usefulness of decorators) >>
endobj
86 0 obj
-<< /Dest [ 57 0 R /XYZ 62.69291 528.0236 0 ] /Next 87 0 R /Parent 81 0 R /Prev 85 0 R /Title (Statement of the problem) >>
+<< /Dest [ 57 0 R /XYZ 62.69291 729.0236 0 ] /Next 87 0 R /Parent 82 0 R /Prev 85 0 R /Title (Definitions) >>
endobj
87 0 obj
-<< /Dest [ 58 0 R /XYZ 62.69291 469.4236 0 ] /Next 88 0 R /Parent 81 0 R /Prev 86 0 R /Title (The solution) >>
+<< /Dest [ 57 0 R /XYZ 62.69291 492.0236 0 ] /Next 88 0 R /Parent 82 0 R /Prev 86 0 R /Title (Statement of the problem) >>
endobj
88 0 obj
-<< /Dest [ 59 0 R /XYZ 62.69291 492.6236 0 ] /Next 89 0 R /Parent 81 0 R /Prev 87 0 R /Title (A trace decorator) >>
+<< /Dest [ 58 0 R /XYZ 62.69291 433.4236 0 ] /Next 89 0 R /Parent 82 0 R /Prev 87 0 R /Title (The solution) >>
endobj
89 0 obj
-<< /Dest [ 61 0 R /XYZ 62.69291 631.8236 0 ] /Next 90 0 R /Parent 81 0 R /Prev 88 0 R /Title (Function annotations) >>
+<< /Dest [ 59 0 R /XYZ 62.69291 435.4236 0 ] /Next 90 0 R /Parent 82 0 R /Prev 88 0 R /Title (A trace decorator) >>
endobj
90 0 obj
-<< /Dest [ 62 0 R /XYZ 62.69291 765.0236 0 ] /Next 91 0 R /Parent 81 0 R /Prev 89 0 R /Title (decorator.decorator) >>
+<< /Dest [ 61 0 R /XYZ 62.69291 566.6236 0 ] /Next 91 0 R /Parent 82 0 R /Prev 89 0 R /Title (Function annotations) >>
endobj
91 0 obj
-<< /Dest [ 62 0 R /XYZ 62.69291 317.2236 0 ] /Next 92 0 R /Parent 81 0 R /Prev 90 0 R /Title (blocking) >>
+<< /Dest [ 62 0 R /XYZ 62.69291 765.0236 0 ] /Next 92 0 R /Parent 82 0 R /Prev 90 0 R /Title (decorator.decorator) >>
endobj
92 0 obj
-<< /Dest [ 63 0 R /XYZ 62.69291 434.6236 0 ] /Next 93 0 R /Parent 81 0 R /Prev 91 0 R /Title (decorator\(cls\)) >>
+<< /Dest [ 62 0 R /XYZ 62.69291 317.2236 0 ] /Next 93 0 R /Parent 82 0 R /Prev 91 0 R /Title (blocking) >>
endobj
93 0 obj
-<< /Dest [ 64 0 R /XYZ 62.69291 542.6236 0 ] /Next 94 0 R /Parent 81 0 R /Prev 92 0 R /Title (contextmanager) >>
+<< /Dest [ 63 0 R /XYZ 62.69291 434.6236 0 ] /Next 94 0 R /Parent 82 0 R /Prev 92 0 R /Title (decorator\(cls\)) >>
endobj
94 0 obj
-<< /Dest [ 65 0 R /XYZ 62.69291 657.0236 0 ] /Next 95 0 R /Parent 81 0 R /Prev 93 0 R /Title (The FunctionMaker class) >>
+<< /Dest [ 64 0 R /XYZ 62.69291 542.6236 0 ] /Next 95 0 R /Parent 82 0 R /Prev 93 0 R /Title (contextmanager) >>
endobj
95 0 obj
-<< /Dest [ 67 0 R /XYZ 62.69291 659.8236 0 ] /Next 96 0 R /Parent 81 0 R /Prev 94 0 R /Title (Getting the source code) >>
+<< /Dest [ 65 0 R /XYZ 62.69291 657.0236 0 ] /Next 96 0 R /Parent 82 0 R /Prev 94 0 R /Title (The FunctionMaker class) >>
endobj
96 0 obj
-<< /Dest [ 67 0 R /XYZ 62.69291 180.0236 0 ] /Next 97 0 R /Parent 81 0 R /Prev 95 0 R /Title (Dealing with third party decorators) >>
+<< /Dest [ 67 0 R /XYZ 62.69291 659.8236 0 ] /Next 97 0 R /Parent 82 0 R /Prev 95 0 R /Title (Getting the source code) >>
endobj
97 0 obj
-<< /Dest [ 70 0 R /XYZ 62.69291 445.4236 0 ] /Next 98 0 R /Parent 81 0 R /Prev 96 0 R /Title (Multiple dispatch) >>
+<< /Dest [ 67 0 R /XYZ 62.69291 180.0236 0 ] /Next 98 0 R /Parent 82 0 R /Prev 96 0 R /Title (Dealing with third party decorators) >>
endobj
98 0 obj
-<< /Dest [ 72 0 R /XYZ 62.69291 227.0236 0 ] /Next 99 0 R /Parent 81 0 R /Prev 97 0 R /Title (Generic functions and virtual ancestors) >>
+<< /Dest [ 70 0 R /XYZ 62.69291 445.4236 0 ] /Next 99 0 R /Parent 82 0 R /Prev 97 0 R /Title (Multiple dispatch) >>
endobj
99 0 obj
-<< /Dest [ 75 0 R /XYZ 62.69291 348.6236 0 ] /Next 100 0 R /Parent 81 0 R /Prev 98 0 R /Title (Caveats and limitations) >>
+<< /Dest [ 73 0 R /XYZ 62.69291 171.0236 0 ] /Next 100 0 R /Parent 82 0 R /Prev 98 0 R /Title (Generic functions and virtual ancestors) >>
endobj
100 0 obj
-<< /Dest [ 78 0 R /XYZ 62.69291 458.6236 0 ] /Parent 81 0 R /Prev 99 0 R /Title (LICENSE) >>
+<< /Dest [ 77 0 R /XYZ 62.69291 276.6236 0 ] /Next 101 0 R /Parent 82 0 R /Prev 99 0 R /Title (Caveats and limitations) >>
endobj
101 0 obj
-<< /Count 20 /Kids [ 49 0 R 52 0 R 57 0 R 58 0 R 59 0 R 61 0 R 62 0 R 63 0 R 64 0 R 65 0 R
- 67 0 R 69 0 R 70 0 R 71 0 R 72 0 R 73 0 R 74 0 R 75 0 R 77 0 R 78 0 R ] /Type /Pages >>
+<< /Dest [ 79 0 R /XYZ 62.69291 396.6236 0 ] /Parent 82 0 R /Prev 100 0 R /Title (LICENSE) >>
endobj
102 0 obj
+<< /Count 20 /Kids [ 49 0 R 52 0 R 57 0 R 58 0 R 59 0 R 61 0 R 62 0 R 63 0 R 64 0 R 65 0 R
+ 67 0 R 69 0 R 70 0 R 71 0 R 73 0 R 75 0 R 76 0 R 77 0 R 78 0 R 79 0 R ] /Type /Pages >>
+endobj
+103 0 obj
<< /Length 7563 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
@@ -767,8 +770,8 @@ Q
endstream
endobj
-103 0 obj
-<< /Length 7477 >>
+104 0 obj
+<< /Length 7225 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
@@ -780,7 +783,7 @@ Q
q
1 0 0 1 62.69291 594.0236 cm
q
-BT 1 0 0 1 0 134 Tm 1.033876 Tw 12 TL /F1 10 Tf 0 0 0 rg (The decorator module is over ten years old, but still alive and kicking. It is used by several frameworks) Tj T* 0 Tw .59832 Tw (\(IPython, scipy, authkit, pylons, repoze, pycuda, sugar, ...\) and has been stable for a ) Tj /F4 10 Tf (long ) Tj /F1 10 Tf (time. It is your) Tj T* 0 Tw .142927 Tw (best option if you want to preserve the signature of decorated functions in a consistent way across Python) Tj T* 0 Tw .103876 Tw (releases. Version 4.0 is fully compatible with the past, except for one thing: support for Python 2.4 and 2.5) Tj T* 0 Tw 1.399431 Tw (has been dropped. That decision made it possible to use a single code base both for Python 2.X and) Tj T* 0 Tw 6.201984 Tw (Python 3.X. This is a ) Tj /F4 10 Tf (huge ) Tj /F1 10 Tf (bonus, since I could remove over 2,000 lines of duplicated) Tj T* 0 Tw .485366 Tw (documentation/doctests. Having to maintain separate docs for Python 2 and Python 3 effectively stopped) Tj T* 0 Tw .384431 Tw (any development on the module for several years. Moreover, it is now trivial to distribute the module as a) Tj T* 0 Tw .649488 Tw 0 0 .501961 rg (wheel ) Tj 0 0 0 rg (since 2to3 is no more required. Since Python 2.5 has been released 9 years ago, I felt that it was) Tj T* 0 Tw 1.462209 Tw (reasonable to drop the support for it. If you need to support ancient versions of Python, stick with the) Tj T* 0 Tw 2.127984 Tw (decorator module version 3.4.2. This version supports all Python releases from 2.6 up to 3.5, which) Tj T* 0 Tw (currently is still in beta status.) Tj T* ET
+BT 1 0 0 1 0 134 Tm 1.033876 Tw 12 TL /F1 10 Tf 0 0 0 rg (The decorator module is over ten years old, but still alive and kicking. It is used by several frameworks) Tj T* 0 Tw 1.401098 Tw (\(IPython, scipy, authkit, pylons, pycuda, sugar, ...\) and has been stable for a ) Tj /F4 10 Tf (long ) Tj /F1 10 Tf (time. It is your best) Tj T* 0 Tw 1.50686 Tw (option if you want to preserve the signature of decorated functions in a consistent way across Python) Tj T* 0 Tw .103876 Tw (releases. Version 4.0 is fully compatible with the past, except for one thing: support for Python 2.4 and 2.5) Tj T* 0 Tw 1.399431 Tw (has been dropped. That decision made it possible to use a single code base both for Python 2.X and) Tj T* 0 Tw 6.201984 Tw (Python 3.X. This is a ) Tj /F4 10 Tf (huge ) Tj /F1 10 Tf (bonus, since I could remove over 2,000 lines of duplicated) Tj T* 0 Tw .485366 Tw (documentation/doctests. Having to maintain separate docs for Python 2 and Python 3 effectively stopped) Tj T* 0 Tw .075542 Tw (any development on the module for several years. Moreover, it is now trivial to distribute the module as an) Tj T* 0 Tw .999987 Tw (universal ) Tj 0 0 .501961 rg (wheel ) Tj 0 0 0 rg (since 2to3 is no more required. Since Python 2.5 has been released 9 years ago, I felt) Tj T* 0 Tw .829461 Tw (that it was reasonable to drop the support for it. If you need to support ancient versions of Python, stick) Tj T* 0 Tw 1.438735 Tw (with the decorator module version 3.4.2. This version supports all Python releases from 2.6 up to 3.5,) Tj T* 0 Tw (which currently is still in beta status.) Tj T* ET
Q
Q
q
@@ -792,36 +795,36 @@ Q
q
1 0 0 1 62.69291 471.0236 cm
q
-BT 1 0 0 1 0 74 Tm 2.334692 Tw 12 TL /F1 10 Tf 0 0 0 rg (Since now there is a single manual for all Python versions, I took the occasion for overhauling the) Tj T* 0 Tw .691098 Tw (documentation. Therefore, even if you are an old time user, you may want to read the docs again, since) Tj T* 0 Tw .311984 Tw (several examples have been improved. The packaging has been improved and now I am also distributing) Tj T* 0 Tw 2.16686 Tw (the code in wheel format. The integration with setuptools has been improved and now you can use) Tj T* 0 Tw .166412 Tw /F3 10 Tf 0 0 0 rg (python) Tj ( ) Tj (setup.py test ) Tj /F1 10 Tf 0 0 0 rg (to run the tests. A new utility function ) Tj /F3 10 Tf 0 0 0 rg (decorate\(func, caller\) ) Tj /F1 10 Tf 0 0 0 rg (has been) Tj T* 0 Tw 3.003318 Tw (added, doing the same job that in the past was done by ) Tj /F3 10 Tf 0 0 0 rg (decorator\(caller,) Tj ( ) Tj (func\)) Tj /F1 10 Tf 0 0 0 rg (. The old) Tj T* 0 Tw (functionality is still there for compatibility sake, but it is deprecated and not documented anymore.) Tj T* ET
+BT 1 0 0 1 0 74 Tm 2.334692 Tw 12 TL /F1 10 Tf 0 0 0 rg (Since now there is a single manual for all Python versions, I took the occasion for overhauling the) Tj T* 0 Tw .691098 Tw (documentation. Therefore, even if you are an old time user, you may want to read the docs again, since) Tj T* 0 Tw .385318 Tw (several examples have been improved. The packaging has been improved and I am distributing the code) Tj T* 0 Tw 3.941984 Tw (in wheel format too. The integration with setuptools has been improved and now you can use) Tj T* 0 Tw .166412 Tw /F3 10 Tf 0 0 0 rg (python) Tj ( ) Tj (setup.py test ) Tj /F1 10 Tf 0 0 0 rg (to run the tests. A new utility function ) Tj /F3 10 Tf 0 0 0 rg (decorate\(func, caller\) ) Tj /F1 10 Tf 0 0 0 rg (has been) Tj T* 0 Tw 3.003318 Tw (added, doing the same job that in the past was done by ) Tj /F3 10 Tf 0 0 0 rg (decorator\(caller,) Tj ( ) Tj (func\)) Tj /F1 10 Tf 0 0 0 rg (. The old) Tj T* 0 Tw (functionality is still there for compatibility sake, but it is deprecated and not documented anymore.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 381.0236 cm
+1 0 0 1 62.69291 369.0236 cm
q
-BT 1 0 0 1 0 74 Tm 4.582126 Tw 12 TL /F1 10 Tf 0 0 0 rg (Apart from that, there is a new experimental feature. The decorator module now includes an) Tj T* 0 Tw 3.31284 Tw (implementation of generic \(multiple dispatch\) functions. The API is designed to mimic the one of) Tj T* 0 Tw 1.893615 Tw /F4 10 Tf 0 0 0 rg (functools.singledispatch ) Tj /F1 10 Tf 0 0 0 rg (but the implementation is much simpler; moreover all the decorators involved) Tj T* 0 Tw .362485 Tw (preserve the signature of the decorated functions. For the moment the facility is there mostly to exemplify) Tj T* 0 Tw .101654 Tw (the power of the module. In the future it could change and/or be enhanced/optimized; on the other hand, it) Tj T* 0 Tw .289431 Tw (could even become deprecated. Such is the fate of experimental features. In any case it is very short and) Tj T* 0 Tw (compact, so you can extract it for your own use. Take it as food for thought.) Tj T* ET
+BT 1 0 0 1 0 86 Tm 4.582126 Tw 12 TL /F1 10 Tf 0 0 0 rg (Apart from that, there is a new experimental feature. The decorator module now includes an) Tj T* 0 Tw 3.31284 Tw (implementation of generic \(multiple dispatch\) functions. The API is designed to mimic the one of) Tj T* 0 Tw 2.965976 Tw /F3 10 Tf 0 0 0 rg (functools.singledispatch ) Tj /F1 10 Tf 0 0 0 rg (\(introduced in Python 3.4\) but the implementation is much simpler;) Tj T* 0 Tw .889983 Tw (moreover all the decorators involved preserve the signature of the decorated functions. For the moment) Tj T* 0 Tw 4.982927 Tw (the facility is there mostly to exemplify the power of the module. In the future it could be) Tj T* 0 Tw 1.08881 Tw (enhanced/optimized; on the other hand, both its behavior and its API could change. Such is the fate of) Tj T* 0 Tw .537765 Tw (experimental features. In any case it is very short and compact \(less then one hundred lines\) so you can) Tj T* 0 Tw (extract it for your own use. Take it as food for thought.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 348.0236 cm
+1 0 0 1 62.69291 336.0236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Usefulness of decorators) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 282.0236 cm
+1 0 0 1 62.69291 270.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 50 Tm /F1 10 Tf 12 TL 3.995366 Tw (Python decorators are an interesting example of why syntactic sugar matters. In principle, their) Tj T* 0 Tw .151235 Tw (introduction in Python 2.4 changed nothing, since they do not provide any new functionality which was not) Tj T* 0 Tw 2.238555 Tw (already present in the language. In practice, their introduction has significantly changed the way we) Tj T* 0 Tw .098409 Tw (structure our programs in Python. I believe the change is for the best, and that decorators are a great idea) Tj T* 0 Tw (since:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 276.0236 cm
+1 0 0 1 62.69291 264.0236 cm
Q
q
-1 0 0 1 62.69291 276.0236 cm
+1 0 0 1 62.69291 264.0236 cm
Q
q
-1 0 0 1 62.69291 264.0236 cm
+1 0 0 1 62.69291 252.0236 cm
0 0 0 rg
BT /F1 10 Tf 12 TL ET
q
@@ -842,10 +845,10 @@ q
Q
Q
q
-1 0 0 1 62.69291 258.0236 cm
+1 0 0 1 62.69291 246.0236 cm
Q
q
-1 0 0 1 62.69291 246.0236 cm
+1 0 0 1 62.69291 234.0236 cm
0 0 0 rg
BT /F1 10 Tf 12 TL ET
q
@@ -866,10 +869,10 @@ q
Q
Q
q
-1 0 0 1 62.69291 240.0236 cm
+1 0 0 1 62.69291 228.0236 cm
Q
q
-1 0 0 1 62.69291 228.0236 cm
+1 0 0 1 62.69291 216.0236 cm
0 0 0 rg
BT /F1 10 Tf 12 TL ET
q
@@ -890,10 +893,10 @@ q
Q
Q
q
-1 0 0 1 62.69291 222.0236 cm
+1 0 0 1 62.69291 210.0236 cm
Q
q
-1 0 0 1 62.69291 210.0236 cm
+1 0 0 1 62.69291 198.0236 cm
0 0 0 rg
BT /F1 10 Tf 12 TL ET
q
@@ -914,55 +917,55 @@ q
Q
Q
q
-1 0 0 1 62.69291 210.0236 cm
+1 0 0 1 62.69291 198.0236 cm
Q
q
-1 0 0 1 62.69291 168.0236 cm
+1 0 0 1 62.69291 156.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 26 Tm /F1 10 Tf 12 TL .848876 Tw (Still, as of now, writing custom decorators correctly requires some experience and it is not as easy as it) Tj T* 0 Tw 1.049269 Tw (could be. For instance, typical implementations of decorators involve nested functions, and we all know) Tj T* 0 Tw (that flat is better than nested.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 114.0236 cm
+1 0 0 1 62.69291 102.0236 cm
q
BT 1 0 0 1 0 38 Tm 1.093735 Tw 12 TL /F1 10 Tf 0 0 0 rg (The aim of the ) Tj /F3 10 Tf 0 0 0 rg (decorator ) Tj /F1 10 Tf 0 0 0 rg (module it to simplify the usage of decorators for the average programmer,) Tj T* 0 Tw 2.456136 Tw (and to popularize decorators by showing various non-trivial examples. Of course, as all techniques,) Tj T* 0 Tw 2.234987 Tw (decorators can be abused \(I have seen that\) and you should not try to solve every problem with a) Tj T* 0 Tw (decorator, just because you can.) Tj T* ET
Q
Q
-q
-1 0 0 1 62.69291 84.02362 cm
-q
-BT 1 0 0 1 0 14 Tm .13561 Tw 12 TL /F1 10 Tf 0 0 0 rg (You may find the source code for all the examples discussed here in the ) Tj /F3 10 Tf 0 0 0 rg (documentation.py ) Tj /F1 10 Tf 0 0 0 rg (file, which) Tj T* 0 Tw (contains the documentation you are reading in the form of doctests.) Tj T* ET
-Q
-Q
endstream
endobj
-104 0 obj
-<< /Length 12505 >>
+105 0 obj
+<< /Length 12385 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 744.0236 cm
+1 0 0 1 62.69291 741.0236 cm
+q
+BT 1 0 0 1 0 14 Tm .13561 Tw 12 TL /F1 10 Tf 0 0 0 rg (You may find the source code for all the examples discussed here in the ) Tj /F3 10 Tf 0 0 0 rg (documentation.py ) Tj /F1 10 Tf 0 0 0 rg (file, which) Tj T* 0 Tw (contains the documentation you are reading in the form of doctests.) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 708.0236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Definitions) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 702.0236 cm
+1 0 0 1 62.69291 666.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 26 Tm /F1 10 Tf 12 TL 2.37561 Tw (Technically speaking, any Python object which can be called with one argument can be used as a) Tj T* 0 Tw .472339 Tw (decorator. However, this definition is somewhat too large to be really useful. It is more convenient to split) Tj T* 0 Tw (the generic class of decorators in two subclasses:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 696.0236 cm
+1 0 0 1 62.69291 660.0236 cm
Q
q
-1 0 0 1 62.69291 696.0236 cm
+1 0 0 1 62.69291 660.0236 cm
Q
q
-1 0 0 1 62.69291 672.0236 cm
+1 0 0 1 62.69291 636.0236 cm
0 0 0 rg
BT /F1 10 Tf 12 TL ET
q
@@ -982,10 +985,10 @@ q
Q
Q
q
-1 0 0 1 62.69291 666.0236 cm
+1 0 0 1 62.69291 630.0236 cm
Q
q
-1 0 0 1 62.69291 642.0236 cm
+1 0 0 1 62.69291 606.0236 cm
0 0 0 rg
BT /F1 10 Tf 12 TL ET
q
@@ -1005,42 +1008,49 @@ q
Q
Q
q
-1 0 0 1 62.69291 642.0236 cm
+1 0 0 1 62.69291 606.0236 cm
Q
q
-1 0 0 1 62.69291 600.0236 cm
+1 0 0 1 62.69291 564.0236 cm
q
BT 1 0 0 1 0 26 Tm 2.832706 Tw 12 TL /F1 10 Tf 0 0 0 rg (Signature-changing decorators have their use: for instance the builtin classes ) Tj /F3 10 Tf 0 0 0 rg (staticmethod ) Tj /F1 10 Tf 0 0 0 rg (and) Tj T* 0 Tw 1.506651 Tw /F3 10 Tf 0 0 0 rg (classmethod ) Tj /F1 10 Tf 0 0 0 rg (are in this group, since they take functions and return descriptor objects which are not) Tj T* 0 Tw (functions, nor callables.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 570.0236 cm
+1 0 0 1 62.69291 534.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 1.735814 Tw (However, signature-preserving decorators are more common and easier to reason about; in particular) Tj T* 0 Tw (signature-preserving decorators can be composed together whereas other decorators in general cannot.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 540.0236 cm
+1 0 0 1 62.69291 504.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .494983 Tw (Writing signature-preserving decorators from scratch is not that obvious, especially if one wants to define) Tj T* 0 Tw (proper decorators that can accept functions with any signature. A simple example will clarify the issue.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 507.0236 cm
+1 0 0 1 62.69291 471.0236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Statement of the problem) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 429.0236 cm
+1 0 0 1 62.69291 393.0236 cm
+q
+BT 1 0 0 1 0 62 Tm .351235 Tw 12 TL /F1 10 Tf 0 0 0 rg (A very common use case for decorators is the memoization of functions. A ) Tj /F3 10 Tf 0 0 0 rg (memoize ) Tj /F1 10 Tf 0 0 0 rg (decorator works by) Tj T* 0 Tw .871988 Tw (caching the result of the function call in a dictionary, so that the next time the function is called with the) Tj T* 0 Tw 2.350651 Tw (same input parameters the result is retrieved from the cache and not recomputed. There are many) Tj T* 0 Tw 2.92247 Tw (implementations of ) Tj /F3 10 Tf 0 0 0 rg (memoize ) Tj /F1 10 Tf 0 0 0 rg (in ) Tj 0 0 .501961 rg (http://www.python.org/moin/PythonDecoratorLibrary) Tj 0 0 0 rg (, but they do not) Tj T* 0 Tw .692126 Tw (preserve the signature. In recent versions of Python you can find a sophisticated ) Tj /F3 10 Tf 0 0 0 rg (lru_cache ) Tj /F1 10 Tf 0 0 0 rg (decorator) Tj T* 0 Tw (in the standard library \(in ) Tj /F3 10 Tf 0 0 0 rg (functools) Tj /F1 10 Tf 0 0 0 rg (\). Here I am just interested in giving an example.) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 363.0236 cm
q
-BT 1 0 0 1 0 62 Tm .351235 Tw 12 TL /F1 10 Tf 0 0 0 rg (A very common use case for decorators is the memoization of functions. A ) Tj /F3 10 Tf 0 0 0 rg (memoize ) Tj /F1 10 Tf 0 0 0 rg (decorator works by) Tj T* 0 Tw .871988 Tw (caching the result of the function call in a dictionary, so that the next time the function is called with the) Tj T* 0 Tw 2.350651 Tw (same input parameters the result is retrieved from the cache and not recomputed. There are many) Tj T* 0 Tw 2.92247 Tw (implementations of ) Tj /F3 10 Tf 0 0 0 rg (memoize ) Tj /F1 10 Tf 0 0 0 rg (in ) Tj 0 0 .501961 rg (http://www.python.org/moin/PythonDecoratorLibrary) Tj 0 0 0 rg (, but they do not) Tj T* 0 Tw 2.683984 Tw (preserve the signature. A simple implementation could be the following \(notice that in general it is) Tj T* 0 Tw (impossible to memoize correctly something that depends on non-hashable arguments\):) Tj T* ET
+0 0 0 rg
+BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .017485 Tw (A simple implementation could be the following \(notice that in general it is impossible to memoize correctly) Tj T* 0 Tw (something that depends on non-hashable arguments\):) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 263.8236 cm
+1 0 0 1 62.69291 197.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -1214,26 +1224,33 @@ Q
Q
Q
q
-1 0 0 1 62.69291 207.8236 cm
+1 0 0 1 62.69291 141.8236 cm
q
-BT 1 0 0 1 0 38 Tm 1.801412 Tw 12 TL /F1 10 Tf 0 0 0 rg (Here we used the ) Tj 0 0 .501961 rg (functools.update_wrapper ) Tj 0 0 0 rg (utility, which has been added in Python 2.5 expressly to) Tj T* 0 Tw .91686 Tw (simplify the definition of decorators \(in older versions of Python you need to copy the function attributes) Tj T* 0 Tw .580814 Tw /F3 10 Tf 0 0 0 rg (__name__) Tj /F1 10 Tf 0 0 0 rg (, ) Tj /F3 10 Tf 0 0 0 rg (__doc__) Tj /F1 10 Tf 0 0 0 rg (, ) Tj /F3 10 Tf 0 0 0 rg (__module__ ) Tj /F1 10 Tf 0 0 0 rg (and ) Tj /F3 10 Tf 0 0 0 rg (__dict__ ) Tj /F1 10 Tf 0 0 0 rg (from the original function to the decorated function) Tj T* 0 Tw (by hand\).) Tj T* ET
+BT 1 0 0 1 0 38 Tm 2.555697 Tw 12 TL /F1 10 Tf 0 0 0 rg (Here i used the ) Tj 0 0 .501961 rg (functools.update_wrapper ) Tj 0 0 0 rg (utility, which has been added in Python 2.5 expressly to) Tj T* 0 Tw .91686 Tw (simplify the definition of decorators \(in older versions of Python you need to copy the function attributes) Tj T* 0 Tw .580814 Tw /F3 10 Tf 0 0 0 rg (__name__) Tj /F1 10 Tf 0 0 0 rg (, ) Tj /F3 10 Tf 0 0 0 rg (__doc__) Tj /F1 10 Tf 0 0 0 rg (, ) Tj /F3 10 Tf 0 0 0 rg (__module__ ) Tj /F1 10 Tf 0 0 0 rg (and ) Tj /F3 10 Tf 0 0 0 rg (__dict__ ) Tj /F1 10 Tf 0 0 0 rg (from the original function to the decorated function) Tj T* 0 Tw (by hand\).) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 165.8236 cm
+1 0 0 1 62.69291 99.82362 cm
q
BT 1 0 0 1 0 26 Tm 2.517126 Tw 12 TL /F1 10 Tf 0 0 0 rg (The implementation above works in the sense that the decorator can accept functions with generic) Tj T* 0 Tw 1.233615 Tw (signatures; unfortunately this implementation does ) Tj /F4 10 Tf (not ) Tj /F1 10 Tf (define a signature-preserving decorator, since in) Tj T* 0 Tw (general ) Tj /F3 10 Tf 0 0 0 rg (memoize_uw ) Tj /F1 10 Tf 0 0 0 rg (returns a function with a ) Tj /F4 10 Tf (different signature ) Tj /F1 10 Tf (from the original function.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 147.8236 cm
+1 0 0 1 62.69291 81.82362 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Consider for instance the following case:) Tj T* ET
Q
Q
+
+endstream
+endobj
+106 0 obj
+<< /Length 15805 >>
+stream
+1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 90.62362 cm
+1 0 0 1 62.69291 691.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -1243,50 +1260,23 @@ q
.662745 .662745 .662745 RG
.5 w
.960784 .960784 .862745 rg
-n -6 -6 468.6898 48 re B*
+n -6 -6 468.6898 72 re B*
Q
q
.960784 .960784 .862745 rg
-n 0 24 66 12 re f*
-.960784 .960784 .862745 rg
-n 0 12 18 12 re f*
+n 0 48 66 12 re f*
.960784 .960784 .862745 rg
-n 24 12 12 12 re f*
+n 0 36 18 12 re f*
.960784 .960784 .862745 rg
-n 36 12 6 12 re f*
+n 24 36 12 12 re f*
.960784 .960784 .862745 rg
-n 42 12 6 12 re f*
+n 36 36 6 12 re f*
.960784 .960784 .862745 rg
-n 48 12 12 12 re f*
+n 42 36 6 12 re f*
.960784 .960784 .862745 rg
-n 24 0 192 12 re f*
-BT 1 0 0 1 0 26 Tm 12 TL /F3 10 Tf .666667 .133333 1 rg (@memoize_uw) Tj 0 0 0 rg T* /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (f1) Tj 0 0 0 rg (\() Tj 0 0 0 rg (x) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj .729412 .129412 .129412 rg ("Simulate some long computation") Tj 0 0 0 rg T* ET
-Q
-Q
-Q
-Q
-Q
-
-endstream
-endobj
-105 0 obj
-<< /Length 16559 >>
-stream
-1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
-q
-1 0 0 1 62.69291 727.8236 cm
-q
-q
-1 0 0 1 0 0 cm
-q
-1 0 0 1 6.6 6.6 cm
-q
-.662745 .662745 .662745 RG
-.5 w
+n 48 36 12 12 re f*
.960784 .960784 .862745 rg
-n -6 -6 468.6898 36 re B*
-Q
-q
+n 24 24 192 12 re f*
.960784 .960784 .862745 rg
n 24 12 24 12 re f*
.960784 .960784 .862745 rg
@@ -1303,20 +1293,20 @@ n 96 12 6 12 re f*
n 24 0 36 12 re f*
.960784 .960784 .862745 rg
n 66 0 6 12 re f*
-BT 1 0 0 1 0 14 Tm 12 TL /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (time) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (sleep) Tj 0 0 0 rg (\() Tj .4 .4 .4 rg (1) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (x) Tj T* ET
+BT 1 0 0 1 0 50 Tm 12 TL /F3 10 Tf .666667 .133333 1 rg (@memoize_uw) Tj 0 0 0 rg T* /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (f1) Tj 0 0 0 rg (\() Tj 0 0 0 rg (x) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj .729412 .129412 .129412 rg ("Simulate some long computation") Tj 0 0 0 rg T* ( ) Tj 0 0 0 rg (time) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (sleep) Tj 0 0 0 rg (\() Tj .4 .4 .4 rg (1) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (x) Tj T* ET
Q
Q
Q
Q
Q
q
-1 0 0 1 62.69291 695.8236 cm
+1 0 0 1 62.69291 659.8236 cm
q
BT 1 0 0 1 0 14 Tm .26311 Tw 12 TL /F1 10 Tf 0 0 0 rg (Here the original function takes a single argument named ) Tj /F3 10 Tf 0 0 0 rg (x) Tj /F1 10 Tf 0 0 0 rg (, but the decorated function takes any number) Tj T* 0 Tw (of arguments and keyword arguments:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 638.6236 cm
+1 0 0 1 62.69291 602.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -1344,6 +1334,8 @@ n 114 24 36 12 re f*
.960784 .960784 .862745 rg
n 156 24 60 12 re f*
.960784 .960784 .862745 rg
+n 228 24 168 12 re f*
+.960784 .960784 .862745 rg
n 0 12 6 12 re f*
.960784 .960784 .862745 rg
n 6 12 6 12 re f*
@@ -1395,20 +1387,20 @@ n 318 0 6 12 re f*
n 324 0 24 12 re f*
.960784 .960784 .862745 rg
n 348 0 6 12 re f*
-BT 1 0 0 1 0 26 Tm 12 TL /F3 10 Tf .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (from) Tj /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 0 1 rg (decorator) Tj /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (import) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (getargspec) Tj 0 0 0 rg T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (print) Tj /F3 10 Tf 0 0 0 rg (\() Tj 0 0 0 rg (getargspec) Tj 0 0 0 rg (\() Tj 0 0 0 rg (f1) Tj 0 0 0 rg (\)\)) Tj 0 0 0 rg T* 0 0 0 rg (ArgSpec) Tj 0 0 0 rg (\() Tj 0 0 0 rg (args) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ([],) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (varargs) Tj .4 .4 .4 rg (=) Tj .729412 .129412 .129412 rg ('args') Tj 0 0 0 rg (,) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (varkw) Tj .4 .4 .4 rg (=) Tj .729412 .129412 .129412 rg ('kw') Tj 0 0 0 rg (,) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (defaults) Tj .4 .4 .4 rg (=) Tj 0 .501961 0 rg (None) Tj 0 0 0 rg (\)) Tj T* ET
+BT 1 0 0 1 0 26 Tm 12 TL /F3 10 Tf .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (from) Tj /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 0 1 rg (decorator) Tj /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (import) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (getargspec) Tj 0 0 0 rg ( ) Tj /F6 10 Tf .25098 .501961 .501961 rg (# akin to inspect.getargspec) Tj /F3 10 Tf 0 0 0 rg T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (print) Tj /F3 10 Tf 0 0 0 rg (\() Tj 0 0 0 rg (getargspec) Tj 0 0 0 rg (\() Tj 0 0 0 rg (f1) Tj 0 0 0 rg (\)\)) Tj 0 0 0 rg T* 0 0 0 rg (ArgSpec) Tj 0 0 0 rg (\() Tj 0 0 0 rg (args) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ([],) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (varargs) Tj .4 .4 .4 rg (=) Tj .729412 .129412 .129412 rg ('args') Tj 0 0 0 rg (,) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (varkw) Tj .4 .4 .4 rg (=) Tj .729412 .129412 .129412 rg ('kw') Tj 0 0 0 rg (,) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (defaults) Tj .4 .4 .4 rg (=) Tj 0 .501961 0 rg (None) Tj 0 0 0 rg (\)) Tj T* ET
Q
Q
Q
Q
Q
q
-1 0 0 1 62.69291 582.6236 cm
+1 0 0 1 62.69291 546.6236 cm
q
-BT 1 0 0 1 0 38 Tm .411235 Tw 12 TL /F1 10 Tf 0 0 0 rg (This means that introspection tools such as ) Tj /F4 10 Tf (pydoc ) Tj /F1 10 Tf (will give wrong informations about the signature of ) Tj /F3 10 Tf 0 0 0 rg (f1) Tj /F1 10 Tf 0 0 0 rg (,) Tj T* 0 Tw .010488 Tw (unless you are using a recent of Python 3.X. This is pretty bad: ) Tj /F4 10 Tf (pydoc ) Tj /F1 10 Tf (will tell you that the function accepts) Tj T* 0 Tw .624431 Tw (a generic signature ) Tj /F3 10 Tf 0 0 0 rg (*args) Tj /F1 10 Tf 0 0 0 rg (, ) Tj /F3 10 Tf 0 0 0 rg (**kw) Tj /F1 10 Tf 0 0 0 rg (, but when you try to call the function with more than an argument, you) Tj T* 0 Tw (will get an error:) Tj T* ET
+BT 1 0 0 1 0 38 Tm .002485 Tw 12 TL /F1 10 Tf 0 0 0 rg (This means that introspection tools such as ) Tj /F3 10 Tf 0 0 0 rg (pydoc ) Tj /F1 10 Tf 0 0 0 rg (will give wrong informations about the signature of ) Tj /F3 10 Tf 0 0 0 rg (f1) Tj /F1 10 Tf 0 0 0 rg (,) Tj T* 0 Tw .047356 Tw (unless you are using Python 3.5. This is pretty bad: ) Tj /F3 10 Tf 0 0 0 rg (pydoc ) Tj /F1 10 Tf 0 0 0 rg (will tell you that the function accepts a generic) Tj T* 0 Tw .416303 Tw (signature ) Tj /F3 10 Tf 0 0 0 rg (*args) Tj /F1 10 Tf 0 0 0 rg (, ) Tj /F3 10 Tf 0 0 0 rg (**kw) Tj /F1 10 Tf 0 0 0 rg (, but when you try to call the function with more than an argument, you will get an) Tj T* 0 Tw (error:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 513.4236 cm
+1 0 0 1 62.69291 477.4236 cm
q
q
1 0 0 1 0 0 cm
@@ -1488,25 +1480,25 @@ Q
Q
Q
q
-1 0 0 1 62.69291 481.4236 cm
+1 0 0 1 62.69291 445.4236 cm
q
-BT 1 0 0 1 0 14 Tm 1.545814 Tw 12 TL /F1 10 Tf 0 0 0 rg (Notice even in Python 3.5 ) Tj /F4 10 Tf 0 0 0 rg (inspect.getargspec ) Tj /F1 10 Tf 0 0 0 rg (and ) Tj /F4 10 Tf 0 0 0 rg (inspect.getfullargspec ) Tj /F1 10 Tf 0 0 0 rg (\(which are deprecated in that) Tj T* 0 Tw (release\) will give the wrong signature.) Tj T* ET
+BT 1 0 0 1 0 14 Tm 3.953307 Tw 12 TL /F1 10 Tf 0 0 0 rg (Notice even in Python 3.5 ) Tj /F3 10 Tf 0 0 0 rg (inspect.getargspec ) Tj /F1 10 Tf 0 0 0 rg (and ) Tj /F3 10 Tf 0 0 0 rg (inspect.getfullargspec ) Tj /F1 10 Tf 0 0 0 rg (\(which are) Tj T* 0 Tw (deprecated in that release\) will give the wrong signature.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 448.4236 cm
+1 0 0 1 62.69291 412.4236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (The solution) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 406.4236 cm
+1 0 0 1 62.69291 370.4236 cm
q
BT 1 0 0 1 0 26 Tm 3.313984 Tw 12 TL /F1 10 Tf 0 0 0 rg (The solution is to provide a generic factory of generators, which hides the complexity of making) Tj T* 0 Tw 3.962976 Tw (signature-preserving decorators from the application programmer. The ) Tj /F3 10 Tf 0 0 0 rg (decorate ) Tj /F1 10 Tf 0 0 0 rg (function in the) Tj T* 0 Tw /F3 10 Tf 0 0 0 rg (decorator ) Tj /F1 10 Tf 0 0 0 rg (module is such a factory:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 373.2236 cm
+1 0 0 1 62.69291 337.2236 cm
q
q
1 0 0 1 0 0 cm
@@ -1540,13 +1532,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 317.2236 cm
+1 0 0 1 62.69291 281.2236 cm
q
BT 1 0 0 1 0 38 Tm 2.144983 Tw 12 TL /F3 10 Tf 0 0 0 rg (decorate ) Tj /F1 10 Tf 0 0 0 rg (takes two arguments, a caller function describing the functionality of the decorator and a) Tj T* 0 Tw 2.594983 Tw (function to be decorated; it returns the decorated function. The caller function must have signature) Tj T* 0 Tw .19311 Tw /F3 10 Tf 0 0 0 rg (\(f,) Tj ( ) Tj (*args,) Tj ( ) Tj (**kw\) ) Tj /F1 10 Tf 0 0 0 rg (and it must call the original function ) Tj /F3 10 Tf 0 0 0 rg (f ) Tj /F1 10 Tf 0 0 0 rg (with arguments ) Tj /F3 10 Tf 0 0 0 rg (args ) Tj /F1 10 Tf 0 0 0 rg (and ) Tj /F3 10 Tf 0 0 0 rg (kw) Tj /F1 10 Tf 0 0 0 rg (, implementing) Tj T* 0 Tw (the wanted capability, i.e. memoization in this case:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 188.0236 cm
+1 0 0 1 62.69291 152.0236 cm
q
q
1 0 0 1 0 0 cm
@@ -1686,14 +1678,21 @@ Q
Q
Q
q
-1 0 0 1 62.69291 168.0236 cm
+1 0 0 1 62.69291 132.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (At this point you can define your decorator as follows:) Tj T* ET
Q
Q
+
+endstream
+endobj
+107 0 obj
+<< /Length 17669 >>
+stream
+1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 110.8236 cm
+1 0 0 1 62.69291 715.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -1746,28 +1745,21 @@ Q
Q
Q
Q
-
-endstream
-endobj
-106 0 obj
-<< /Length 18516 >>
-stream
-1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 729.0236 cm
+1 0 0 1 62.69291 671.8236 cm
q
BT 1 0 0 1 0 26 Tm .12561 Tw 12 TL /F1 10 Tf 0 0 0 rg (The difference with respect to the ) Tj /F3 10 Tf 0 0 0 rg (memoize_uw ) Tj /F1 10 Tf 0 0 0 rg (approach, which is based on nested functions, is that the) Tj T* 0 Tw .598876 Tw (decorator module forces you to lift the inner function at the outer level. Moreover, you are forced to pass) Tj T* 0 Tw (explicitly the function you want to decorate, there are no closures.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 711.0236 cm
+1 0 0 1 62.69291 653.8236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Here is a test of usage:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 569.8236 cm
+1 0 0 1 62.69291 512.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -1859,13 +1851,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 549.8236 cm
+1 0 0 1 62.69291 492.6236 cm
q
BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (The signature of ) Tj /F3 10 Tf 0 0 0 rg (heavy_computation ) Tj /F1 10 Tf 0 0 0 rg (is the one you would expect:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 504.6236 cm
+1 0 0 1 62.69291 447.4236 cm
q
q
1 0 0 1 0 0 cm
@@ -1937,19 +1929,19 @@ Q
Q
Q
q
-1 0 0 1 62.69291 471.6236 cm
+1 0 0 1 62.69291 414.4236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (A ) Tj /F3 17.5 Tf 0 0 0 rg (trace ) Tj /F2 17.5 Tf 0 0 0 rg (decorator) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 441.6236 cm
+1 0 0 1 62.69291 384.4236 cm
q
BT 1 0 0 1 0 14 Tm .479398 Tw 12 TL /F1 10 Tf 0 0 0 rg (As an additional example, here is how you can define a trivial ) Tj /F3 10 Tf 0 0 0 rg (trace ) Tj /F1 10 Tf 0 0 0 rg (decorator, which prints a message) Tj T* 0 Tw (everytime the traced function is called:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 372.4236 cm
+1 0 0 1 62.69291 315.2236 cm
q
q
1 0 0 1 0 0 cm
@@ -2099,7 +2091,7 @@ Q
Q
Q
q
-1 0 0 1 62.69291 327.2236 cm
+1 0 0 1 62.69291 270.0236 cm
q
q
1 0 0 1 0 0 cm
@@ -2143,14 +2135,14 @@ Q
Q
Q
q
-1 0 0 1 62.69291 307.2236 cm
+1 0 0 1 62.69291 250.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Here is an example of usage:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 250.0236 cm
+1 0 0 1 62.69291 192.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -2194,13 +2186,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 230.0236 cm
+1 0 0 1 62.69291 172.8236 cm
q
BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (It is immediate to verify that ) Tj /F3 10 Tf 0 0 0 rg (f1 ) Tj /F1 10 Tf 0 0 0 rg (works) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 184.8236 cm
+1 0 0 1 62.69291 127.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -2250,14 +2242,21 @@ Q
Q
Q
q
-1 0 0 1 62.69291 164.8236 cm
+1 0 0 1 62.69291 107.6236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (and it that it has the correct signature:) Tj T* ET
Q
Q
+
+endstream
+endobj
+108 0 obj
+<< /Length 20133 >>
+stream
+1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 119.6236 cm
+1 0 0 1 62.69291 727.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -2333,21 +2332,14 @@ Q
Q
Q
q
-1 0 0 1 62.69291 99.62362 cm
+1 0 0 1 62.69291 707.8236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (The same decorator works with functions of any signature:) Tj T* ET
Q
Q
-
-endstream
-endobj
-107 0 obj
-<< /Length 17749 >>
-stream
-1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 643.8236 cm
+1 0 0 1 62.69291 578.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -2531,19 +2523,19 @@ Q
Q
Q
q
-1 0 0 1 62.69291 610.8236 cm
+1 0 0 1 62.69291 545.6236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Function annotations) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 556.8236 cm
+1 0 0 1 62.69291 491.6236 cm
q
BT 1 0 0 1 0 38 Tm 1.937318 Tw 12 TL /F1 10 Tf 0 0 0 rg (Python 3 introduced the concept of ) Tj 0 0 .501961 rg (function annotations) Tj 0 0 0 rg (,i.e. the ability to annotate the signature of a) Tj T* 0 Tw 2.24816 Tw (function with additional information, stored in a dictionary named ) Tj /F3 10 Tf 0 0 0 rg (__annotations__) Tj /F1 10 Tf 0 0 0 rg (. The decorator) Tj T* 0 Tw 1.923735 Tw (module, starting from release 3.3, is able to understand and to preserve the annotations. Here is an) Tj T* 0 Tw (example:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 487.6236 cm
+1 0 0 1 62.69291 422.4236 cm
q
q
1 0 0 1 0 0 cm
@@ -2633,13 +2625,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 455.6236 cm
+1 0 0 1 62.69291 390.4236 cm
q
BT 1 0 0 1 0 14 Tm .596647 Tw 12 TL /F1 10 Tf 0 0 0 rg (In order to introspect functions with annotations, one needs the utility ) Tj /F3 10 Tf 0 0 0 rg (inspect.getfullargspec) Tj /F1 10 Tf 0 0 0 rg (, new) Tj T* 0 Tw (in Python 3 \(and deprecated in favor of ) Tj /F3 10 Tf 0 0 0 rg (inspect.signature ) Tj /F1 10 Tf 0 0 0 rg (in Python 3.5\):) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 278.4236 cm
+1 0 0 1 62.69291 213.2236 cm
q
q
1 0 0 1 0 0 cm
@@ -2793,13 +2785,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 258.4236 cm
+1 0 0 1 62.69291 193.2236 cm
q
BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (You can check that the ) Tj /F3 10 Tf 0 0 0 rg (__annotations__ ) Tj /F1 10 Tf 0 0 0 rg (dictionary is preserved:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 213.2236 cm
+1 0 0 1 62.69291 148.0236 cm
q
q
1 0 0 1 0 0 cm
@@ -2845,15 +2837,15 @@ Q
Q
Q
q
-1 0 0 1 62.69291 157.2236 cm
+1 0 0 1 62.69291 92.02362 cm
q
-BT 1 0 0 1 0 38 Tm .84284 Tw 12 TL /F1 10 Tf 0 0 0 rg (Here ) Tj /F3 10 Tf 0 0 0 rg (f.__wrapped__ ) Tj /F1 10 Tf 0 0 0 rg (is the original undecorated function. Such an attribute is added to be consistent) Tj T* 0 Tw 1.36998 Tw (with the way ) Tj /F3 10 Tf 0 0 0 rg (functools.update_wrapper ) Tj /F1 10 Tf 0 0 0 rg (work. Another attribute which is copied from the original) Tj T* 0 Tw .41881 Tw (function is ) Tj /F3 10 Tf 0 0 0 rg (__qualname__) Tj /F1 10 Tf 0 0 0 rg (, the qualified name. This is a concept introduced in Python 3. In Python 2 the) Tj T* 0 Tw (decorator module will still add a qualified name, but its value will always be ) Tj /F4 10 Tf 0 0 0 rg (None) Tj /F1 10 Tf 0 0 0 rg (.) Tj T* ET
+BT 1 0 0 1 0 38 Tm .84284 Tw 12 TL /F1 10 Tf 0 0 0 rg (Here ) Tj /F3 10 Tf 0 0 0 rg (f.__wrapped__ ) Tj /F1 10 Tf 0 0 0 rg (is the original undecorated function. Such an attribute is added to be consistent) Tj T* 0 Tw 1.36998 Tw (with the way ) Tj /F3 10 Tf 0 0 0 rg (functools.update_wrapper ) Tj /F1 10 Tf 0 0 0 rg (work. Another attribute which is copied from the original) Tj T* 0 Tw .41881 Tw (function is ) Tj /F3 10 Tf 0 0 0 rg (__qualname__) Tj /F1 10 Tf 0 0 0 rg (, the qualified name. This is a concept introduced in Python 3. In Python 2 the) Tj T* 0 Tw (decorator module will still add a qualified name, but its value will always be ) Tj /F3 10 Tf 0 0 0 rg (None) Tj /F1 10 Tf 0 0 0 rg (.) Tj T* ET
Q
Q
endstream
endobj
-108 0 obj
+109 0 obj
<< /Length 20355 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
@@ -3419,7 +3411,7 @@ Q
endstream
endobj
-109 0 obj
+110 0 obj
<< /Length 18696 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
@@ -3922,8 +3914,8 @@ Q
endstream
endobj
-110 0 obj
-<< /Length 14654 >>
+111 0 obj
+<< /Length 14663 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
@@ -4049,17 +4041,17 @@ n 6 36 6 12 re f*
.960784 .960784 .862745 rg
n 12 36 6 12 re f*
.960784 .960784 .862745 rg
-n 24 36 12 12 re f*
+n 24 36 24 12 re f*
.960784 .960784 .862745 rg
-n 42 36 6 12 re f*
+n 54 36 6 12 re f*
.960784 .960784 .862745 rg
-n 54 36 72 12 re f*
+n 66 36 72 12 re f*
.960784 .960784 .862745 rg
-n 126 36 6 12 re f*
+n 138 36 6 12 re f*
.960784 .960784 .862745 rg
-n 132 36 6 12 re f*
+n 144 36 6 12 re f*
.960784 .960784 .862745 rg
-n 138 36 6 12 re f*
+n 150 36 6 12 re f*
.960784 .960784 .862745 rg
n 0 24 6 12 re f*
.960784 .960784 .862745 rg
@@ -4067,17 +4059,17 @@ n 6 24 6 12 re f*
.960784 .960784 .862745 rg
n 12 24 6 12 re f*
.960784 .960784 .862745 rg
-n 24 24 12 12 re f*
+n 24 24 24 12 re f*
.960784 .960784 .862745 rg
-n 42 24 6 12 re f*
+n 54 24 6 12 re f*
.960784 .960784 .862745 rg
-n 54 24 72 12 re f*
+n 66 24 72 12 re f*
.960784 .960784 .862745 rg
-n 126 24 6 12 re f*
+n 138 24 6 12 re f*
.960784 .960784 .862745 rg
-n 132 24 6 12 re f*
+n 144 24 6 12 re f*
.960784 .960784 .862745 rg
-n 138 24 6 12 re f*
+n 150 24 6 12 re f*
.960784 .960784 .862745 rg
n 0 12 6 12 re f*
.960784 .960784 .862745 rg
@@ -4085,26 +4077,26 @@ n 6 12 6 12 re f*
.960784 .960784 .862745 rg
n 12 12 6 12 re f*
.960784 .960784 .862745 rg
-n 24 12 12 12 re f*
+n 24 12 24 12 re f*
.960784 .960784 .862745 rg
-n 36 12 6 12 re f*
+n 48 12 6 12 re f*
.960784 .960784 .862745 rg
-n 42 12 36 12 re f*
+n 54 12 36 12 re f*
.960784 .960784 .862745 rg
-n 78 12 12 12 re f*
+n 90 12 12 12 re f*
.960784 .960784 .862745 rg
-n 96 12 6 12 re f*
+n 108 12 6 12 re f*
.960784 .960784 .862745 rg
-n 108 12 12 12 re f*
+n 120 12 24 12 re f*
.960784 .960784 .862745 rg
-n 120 12 6 12 re f*
+n 144 12 6 12 re f*
.960784 .960784 .862745 rg
-n 126 12 36 12 re f*
+n 150 12 36 12 re f*
.960784 .960784 .862745 rg
-n 162 12 12 12 re f*
+n 186 12 12 12 re f*
.960784 .960784 .862745 rg
n 0 0 6 12 re f*
-BT 1 0 0 1 0 110 Tm 12 TL /F3 10 Tf .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (futurefactory) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (decorator) Tj 0 0 0 rg (\() Tj 0 0 0 rg (Future) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj .666667 .133333 1 rg (@futurefactory) Tj 0 0 0 rg T* .4 .4 .4 rg (...) Tj 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (long_running) Tj 0 0 0 rg (\() Tj 0 0 0 rg (x) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* .4 .4 .4 rg (...) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (time) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (sleep) Tj 0 0 0 rg (\() Tj .4 .4 .4 rg (.) Tj .4 .4 .4 rg (5) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* .4 .4 .4 rg (...) Tj 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (x) Tj 0 0 0 rg T* T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (f1) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (long_running) Tj 0 0 0 rg (\() Tj .4 .4 .4 rg (1) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (f2) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (long_running) Tj 0 0 0 rg (\() Tj .4 .4 .4 rg (2) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (f1) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (result) Tj 0 0 0 rg (\(\)) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (+) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (f2) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (result) Tj 0 0 0 rg (\(\)) Tj 0 0 0 rg T* .4 .4 .4 rg (3) Tj T* ET
+BT 1 0 0 1 0 110 Tm 12 TL /F3 10 Tf .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (futurefactory) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (decorator) Tj 0 0 0 rg (\() Tj 0 0 0 rg (Future) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj .666667 .133333 1 rg (@futurefactory) Tj 0 0 0 rg T* .4 .4 .4 rg (...) Tj 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (long_running) Tj 0 0 0 rg (\() Tj 0 0 0 rg (x) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* .4 .4 .4 rg (...) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (time) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (sleep) Tj 0 0 0 rg (\() Tj .4 .4 .4 rg (.) Tj .4 .4 .4 rg (5) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* .4 .4 .4 rg (...) Tj 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (x) Tj 0 0 0 rg T* T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (fut1) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (long_running) Tj 0 0 0 rg (\() Tj .4 .4 .4 rg (1) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (fut2) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (long_running) Tj 0 0 0 rg (\() Tj .4 .4 .4 rg (2) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* .4 .4 .4 rg (>) Tj (>) Tj (>) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (fut1) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (result) Tj 0 0 0 rg (\(\)) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (+) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (fut2) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (result) Tj 0 0 0 rg (\(\)) Tj 0 0 0 rg T* .4 .4 .4 rg (3) Tj T* ET
Q
Q
Q
@@ -4345,7 +4337,7 @@ Q
endstream
endobj
-111 0 obj
+112 0 obj
<< /Length 14329 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
@@ -4646,8 +4638,8 @@ Q
endstream
endobj
-112 0 obj
-<< /Length 18313 >>
+113 0 obj
+<< /Length 18360 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
@@ -4805,7 +4797,7 @@ Q
q
1 0 0 1 62.69291 560.8236 cm
q
-BT 1 0 0 1 0 62 Tm 5.045529 Tw 12 TL /F1 10 Tf 0 0 0 rg (Internally ) Tj /F3 10 Tf 0 0 0 rg (FunctionMaker.create ) Tj /F1 10 Tf 0 0 0 rg (uses ) Tj /F3 10 Tf 0 0 0 rg (exec ) Tj /F1 10 Tf 0 0 0 rg (to generate the decorated function. Therefore) Tj T* 0 Tw 2.542126 Tw /F3 10 Tf 0 0 0 rg (inspect.getsource ) Tj /F1 10 Tf 0 0 0 rg (will not work for decorated functions. That means that the usual '??' trick in) Tj T* 0 Tw 26.45775 Tw (IPython will give you the \(right on the spot\) message) Tj T* 0 Tw .261647 Tw /F3 10 Tf 0 0 0 rg (Dynamically) Tj ( ) Tj (generated) Tj ( ) Tj (function.) Tj ( ) Tj (No) Tj ( ) Tj (source) Tj ( ) Tj (code available) Tj /F1 10 Tf 0 0 0 rg (. In the past I have considered) Tj T* 0 Tw .945366 Tw (this acceptable, since ) Tj /F3 10 Tf 0 0 0 rg (inspect.getsource ) Tj /F1 10 Tf 0 0 0 rg (does not really work even with regular decorators. In that) Tj T* 0 Tw (case ) Tj /F3 10 Tf 0 0 0 rg (inspect.getsource ) Tj /F1 10 Tf 0 0 0 rg (gives you the wrapper source code which is probably not what you want:) Tj T* ET
+BT 1 0 0 1 0 62 Tm 5.045529 Tw 12 TL /F1 10 Tf 0 0 0 rg (Internally ) Tj /F3 10 Tf 0 0 0 rg (FunctionMaker.create ) Tj /F1 10 Tf 0 0 0 rg (uses ) Tj /F3 10 Tf 0 0 0 rg (exec ) Tj /F1 10 Tf 0 0 0 rg (to generate the decorated function. Therefore) Tj T* 0 Tw 2.522126 Tw /F3 10 Tf 0 0 0 rg (inspect.getsource ) Tj /F1 10 Tf 0 0 0 rg (will not work for decorated functions. That means that the usual ) Tj /F3 10 Tf 0 0 0 rg (?? ) Tj /F1 10 Tf 0 0 0 rg (trick in) Tj T* 0 Tw 26.45775 Tw (IPython will give you the \(right on the spot\) message) Tj T* 0 Tw .261647 Tw /F3 10 Tf 0 0 0 rg (Dynamically) Tj ( ) Tj (generated) Tj ( ) Tj (function.) Tj ( ) Tj (No) Tj ( ) Tj (source) Tj ( ) Tj (code available) Tj /F1 10 Tf 0 0 0 rg (. In the past I have considered) Tj T* 0 Tw .945366 Tw (this acceptable, since ) Tj /F3 10 Tf 0 0 0 rg (inspect.getsource ) Tj /F1 10 Tf 0 0 0 rg (does not really work even with regular decorators. In that) Tj T* 0 Tw (case ) Tj /F3 10 Tf 0 0 0 rg (inspect.getsource ) Tj /F1 10 Tf 0 0 0 rg (gives you the wrapper source code which is probably not what you want:) Tj T* ET
Q
Q
q
@@ -5031,7 +5023,7 @@ Q
q
1 0 0 1 62.69291 309.2236 cm
q
-BT 1 0 0 1 0 38 Tm .011098 Tw 12 TL /F1 10 Tf 0 0 0 rg (\(see bug report ) Tj 0 0 .501961 rg (1764286 ) Tj 0 0 0 rg (for an explanation of what is happening\). Unfortunately the bug is still there, in all) Tj T* 0 Tw 1.33436 Tw (versions of Python except Python 3.5, which is not yet released. There is however a workaround. The) Tj T* 0 Tw .325984 Tw (decorated function has an attribute ) Tj /F3 10 Tf 0 0 0 rg (.__wrapped__) Tj /F1 10 Tf 0 0 0 rg (, pointing to the original function. The easy way to get) Tj T* 0 Tw (the source code is to call ) Tj /F3 10 Tf 0 0 0 rg (inspect.getsource ) Tj /F1 10 Tf 0 0 0 rg (on the undecorated function:) Tj T* ET
+BT 1 0 0 1 0 38 Tm .011098 Tw 12 TL /F1 10 Tf 0 0 0 rg (\(see bug report ) Tj 0 0 .501961 rg (1764286 ) Tj 0 0 0 rg (for an explanation of what is happening\). Unfortunately the bug is still there, in all) Tj T* 0 Tw 1.33436 Tw (versions of Python except Python 3.5, which is not yet released. There is however a workaround. The) Tj T* 0 Tw .725984 Tw (decorated function has an attribute ) Tj /F3 10 Tf 0 0 0 rg (__wrapped__) Tj /F1 10 Tf 0 0 0 rg (, pointing to the original function. The easy way to get) Tj T* 0 Tw (the source code is to call ) Tj /F3 10 Tf 0 0 0 rg (inspect.getsource ) Tj /F1 10 Tf 0 0 0 rg (on the undecorated function:) Tj T* ET
Q
Q
q
@@ -5159,7 +5151,7 @@ Q
endstream
endobj
-113 0 obj
+114 0 obj
<< /Length 16552 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
@@ -5577,7 +5569,7 @@ Q
endstream
endobj
-114 0 obj
+115 0 obj
<< /Length 12356 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
@@ -5902,7 +5894,7 @@ Q
endstream
endobj
-115 0 obj
+116 0 obj
<< /Length 17002 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
@@ -6451,8 +6443,8 @@ Q
endstream
endobj
-116 0 obj
-<< /Length 14727 >>
+117 0 obj
+<< /Length 13663 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
@@ -6873,20 +6865,33 @@ Q
Q
Q
q
-1 0 0 1 62.69291 206.0236 cm
+1 0 0 1 62.69291 183.0236 cm
+q
+BT 1 0 0 1 0 38 Tm 3.354269 Tw 12 TL /F1 10 Tf 0 0 0 rg (Since there is no direct implementation for \(StrongRock, Scissors\) the dispatcher will look at the) Tj T* 0 Tw .352651 Tw (implementation for \(Rock, Scissors\) which is available. Internally the algorithm is doing a cross product of) Tj T* 0 Tw 1.64784 Tw (the class precedence lists \(or Method Resolution Orders, ) Tj 0 0 .501961 rg (MRO ) Tj 0 0 0 rg (for short\) of StrongRock and Scissors) Tj T* 0 Tw (respectively.) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 150.0236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Generic functions and virtual ancestors) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 176.0236 cm
+1 0 0 1 62.69291 120.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 1.225366 Tw (Generic function implementations in Python are complicated by the existence of "virtual ancestors", i.e.) Tj T* 0 Tw (superclasses which are not in the class hierarchy. Consider for instance this class:) Tj T* ET
Q
Q
+
+endstream
+endobj
+118 0 obj
+<< /Length 13087 >>
+stream
+1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 118.8236 cm
+1 0 0 1 62.69291 715.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -6930,20 +6935,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 86.82362 cm
+1 0 0 1 62.69291 683.8236 cm
q
BT 1 0 0 1 0 14 Tm .772765 Tw 12 TL /F1 10 Tf 0 0 0 rg (This class defines a ) Tj /F3 10 Tf 0 0 0 rg (__len__ ) Tj /F1 10 Tf 0 0 0 rg (method and as such is considered to be a subclass of the abstract base) Tj T* 0 Tw (class ) Tj /F3 10 Tf 0 0 0 rg (collections.Sized) Tj /F1 10 Tf 0 0 0 rg (:) Tj T* ET
Q
Q
-
-endstream
-endobj
-117 0 obj
-<< /Length 12942 >>
-stream
-1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 727.8236 cm
+1 0 0 1 62.69291 638.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -6987,20 +6985,20 @@ Q
Q
Q
q
-1 0 0 1 62.69291 683.8236 cm
+1 0 0 1 62.69291 594.6236 cm
q
-BT 1 0 0 1 0 26 Tm 2.414651 Tw 12 TL /F1 10 Tf 0 0 0 rg (However, ) Tj /F3 10 Tf 0 0 0 rg (collections.Sized ) Tj /F1 10 Tf 0 0 0 rg (is not in the MRO of ) Tj /F3 10 Tf 0 0 0 rg (WithLength) Tj /F1 10 Tf 0 0 0 rg (, it is not a true ancestor. Any) Tj T* 0 Tw .651412 Tw (implementation of generic functions, even with single dispatch, must go through some contorsion to take) Tj T* 0 Tw (into account the virtual ancestors.) Tj T* ET
+BT 1 0 0 1 0 26 Tm 2.414651 Tw 12 TL /F1 10 Tf 0 0 0 rg (However, ) Tj /F3 10 Tf 0 0 0 rg (collections.Sized ) Tj /F1 10 Tf 0 0 0 rg (is not in the ) Tj 0 0 .501961 rg (MRO ) Tj 0 0 0 rg (of ) Tj /F3 10 Tf 0 0 0 rg (WithLength) Tj /F1 10 Tf 0 0 0 rg (, it is not a true ancestor. Any) Tj T* 0 Tw .651412 Tw (implementation of generic functions, even with single dispatch, must go through some contorsion to take) Tj T* 0 Tw (into account the virtual ancestors.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 665.8236 cm
+1 0 0 1 62.69291 576.6236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (In particular if we define a generic function) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 608.6236 cm
+1 0 0 1 62.69291 519.4236 cm
q
q
1 0 0 1 0 0 cm
@@ -7052,14 +7050,14 @@ Q
Q
Q
q
-1 0 0 1 62.69291 588.6236 cm
+1 0 0 1 62.69291 499.4236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (implemented on all classes with a length) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 531.4236 cm
+1 0 0 1 62.69291 442.2236 cm
q
q
1 0 0 1 0 0 cm
@@ -7111,13 +7109,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 511.4236 cm
+1 0 0 1 62.69291 422.2236 cm
q
BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (then ) Tj /F3 10 Tf 0 0 0 rg (get_length ) Tj /F1 10 Tf 0 0 0 rg (must be defined on ) Tj /F3 10 Tf 0 0 0 rg (WithLength ) Tj /F1 10 Tf 0 0 0 rg (instances) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 466.2236 cm
+1 0 0 1 62.69291 377.0236 cm
q
q
1 0 0 1 0 0 cm
@@ -7153,26 +7151,26 @@ Q
Q
Q
q
-1 0 0 1 62.69291 434.2236 cm
+1 0 0 1 62.69291 345.0236 cm
q
BT 1 0 0 1 0 14 Tm 2.228651 Tw 12 TL /F1 10 Tf 0 0 0 rg (even if ) Tj /F3 10 Tf 0 0 0 rg (collections.Sized ) Tj /F1 10 Tf 0 0 0 rg (is not a true ancestor of ) Tj /F3 10 Tf 0 0 0 rg (WithLength) Tj /F1 10 Tf 0 0 0 rg (. Of course this is a contrived) Tj T* 0 Tw (example since you could just use the builtin ) Tj /F3 10 Tf 0 0 0 rg (len) Tj /F1 10 Tf 0 0 0 rg (, but you should get the idea.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 392.2236 cm
+1 0 0 1 62.69291 303.0236 cm
q
BT 1 0 0 1 0 26 Tm .129461 Tw 12 TL /F1 10 Tf 0 0 0 rg (Since in Python it is possible to consider any instance of ABCMeta as a virtual ancestor of any other class) Tj T* 0 Tw .21152 Tw (\(it is enough to register it as ) Tj /F3 10 Tf 0 0 0 rg (ancestor.register\(cls\)) Tj /F1 10 Tf 0 0 0 rg (\), any implementation of generic functions must) Tj T* 0 Tw (take virtual ancestors into account. Let me give an example.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 374.2236 cm
+1 0 0 1 62.69291 285.0236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Suppose you are using a third party set-like class like the following:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 293.0236 cm
+1 0 0 1 62.69291 203.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -7224,19 +7222,19 @@ Q
Q
Q
q
-1 0 0 1 62.69291 261.0236 cm
+1 0 0 1 62.69291 171.8236 cm
q
BT 1 0 0 1 0 14 Tm 1.042651 Tw 12 TL /F1 10 Tf 0 0 0 rg (Here the author of ) Tj /F3 10 Tf 0 0 0 rg (SomeSet ) Tj /F1 10 Tf 0 0 0 rg (made a mistake by not inheriting from ) Tj /F3 10 Tf 0 0 0 rg (collections.Set) Tj /F1 10 Tf 0 0 0 rg (, but only from) Tj T* 0 Tw /F3 10 Tf 0 0 0 rg (collections.Sized) Tj /F1 10 Tf 0 0 0 rg (.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 231.0236 cm
+1 0 0 1 62.69291 141.8236 cm
q
BT 1 0 0 1 0 14 Tm 1.588735 Tw 12 TL /F1 10 Tf 0 0 0 rg (This is not a problem since you can register ) Tj /F4 10 Tf (a posteriori) Tj /F1 10 Tf ( ) Tj /F3 10 Tf 0 0 0 rg (collections.Set ) Tj /F1 10 Tf 0 0 0 rg (as a virtual ancestor of) Tj T* 0 Tw /F3 10 Tf 0 0 0 rg (SomeSet) Tj /F1 10 Tf 0 0 0 rg (:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 173.8236 cm
+1 0 0 1 62.69291 84.62362 cm
q
q
1 0 0 1 0 0 cm
@@ -7305,14 +7303,21 @@ Q
Q
Q
Q
+
+endstream
+endobj
+119 0 obj
+<< /Length 12076 >>
+stream
+1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 153.8236 cm
+1 0 0 1 62.69291 753.0236 cm
q
BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (Now, let us define an implementation of ) Tj /F3 10 Tf 0 0 0 rg (get_length ) Tj /F1 10 Tf 0 0 0 rg (specific to set:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 96.62362 cm
+1 0 0 1 62.69291 695.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -7357,21 +7362,14 @@ Q
Q
Q
Q
-
-endstream
-endobj
-118 0 obj
-<< /Length 12051 >>
-stream
-1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 741.0236 cm
+1 0 0 1 62.69291 663.8236 cm
q
BT 1 0 0 1 0 14 Tm .210697 Tw 12 TL /F1 10 Tf 0 0 0 rg (The current implementation, as the one used by ) Tj /F3 10 Tf 0 0 0 rg (functools.singledispatch) Tj /F1 10 Tf 0 0 0 rg (, is able to discern that a) Tj T* 0 Tw /F3 10 Tf 0 0 0 rg (Set ) Tj /F1 10 Tf 0 0 0 rg (is a ) Tj /F3 10 Tf 0 0 0 rg (Sized ) Tj /F1 10 Tf 0 0 0 rg (object, so the more specific implementation for ) Tj /F3 10 Tf 0 0 0 rg (Set ) Tj /F1 10 Tf 0 0 0 rg (is taken:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 695.8236 cm
+1 0 0 1 62.69291 618.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -7409,13 +7407,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 627.8236 cm
+1 0 0 1 62.69291 550.6236 cm
q
BT 1 0 0 1 0 50 Tm 3.503735 Tw 12 TL /F1 10 Tf 0 0 0 rg (Sometimes it is not clear how to dispatch. For instance, consider a class ) Tj /F3 10 Tf 0 0 0 rg (C ) Tj /F1 10 Tf 0 0 0 rg (registered both as) Tj T* 0 Tw 6.519974 Tw /F3 10 Tf 0 0 0 rg (collections.Iterable ) Tj /F1 10 Tf 0 0 0 rg (and ) Tj /F3 10 Tf 0 0 0 rg (collections.Sized ) Tj /F1 10 Tf 0 0 0 rg (and define a generic function ) Tj /F3 10 Tf 0 0 0 rg (g ) Tj /F1 10 Tf 0 0 0 rg (with) Tj T* 0 Tw 3.101085 Tw (implementations both for ) Tj /F3 10 Tf 0 0 0 rg (collections.Iterable ) Tj /F1 10 Tf 0 0 0 rg (and ) Tj /F3 10 Tf 0 0 0 rg (collections.Sized) Tj /F1 10 Tf 0 0 0 rg (. It is impossible to) Tj T* 0 Tw .690697 Tw (decide which implementation to use, since the ancestors are independent, and the following function will) Tj T* 0 Tw (raise a RuntimeError when called:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 414.6236 cm
+1 0 0 1 62.69291 337.4236 cm
q
q
1 0 0 1 0 0 cm
@@ -7541,26 +7539,26 @@ Q
Q
Q
q
-1 0 0 1 62.69291 382.6236 cm
+1 0 0 1 62.69291 305.4236 cm
q
BT 1 0 0 1 0 14 Tm .745433 Tw 12 TL /F1 10 Tf 0 0 0 rg (This is consistent with the "refuse the temptation to guess" philosophy. ) Tj /F3 10 Tf 0 0 0 rg (functools.singledispatch) Tj T* 0 Tw /F1 10 Tf 0 0 0 rg (would raise a similar error.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 304.6236 cm
+1 0 0 1 62.69291 227.4236 cm
q
0 0 0 rg
BT 1 0 0 1 0 62 Tm /F1 10 Tf 12 TL .01104 Tw (It would be easy to rely on the order of registration to decide the precedence order. This is reasonable, but) Tj T* 0 Tw 3.788555 Tw (also fragile: if during some refactoring you change the registration order by mistake, a different) Tj T* 0 Tw 3.585814 Tw (implementation could be taken. If implementations of the generic functions are distributed across) Tj T* 0 Tw .939984 Tw (modules, and you change the import order, a different implementation could be taken. So the decorator) Tj T* 0 Tw .128935 Tw (module prefers to raise an error in the face of ambiguity. This is the same approach taken by the standard) Tj T* 0 Tw (library.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 238.6236 cm
+1 0 0 1 62.69291 161.4236 cm
q
BT 1 0 0 1 0 50 Tm .743735 Tw 12 TL /F1 10 Tf 0 0 0 rg (However, it should be noticed that the dispatch algorithm used by the decorator module is different from) Tj T* 0 Tw 2.269398 Tw (the one used by the standard library, so there are cases where you will get different answers. The) Tj T* 0 Tw 1.830814 Tw (difference is that ) Tj /F3 10 Tf 0 0 0 rg (functools.singledispatch ) Tj /F1 10 Tf 0 0 0 rg (tries to insert the virtual ancestors ) Tj /F4 10 Tf (before ) Tj /F1 10 Tf (the base) Tj T* 0 Tw 1.149983 Tw (classes, whereas ) Tj /F3 10 Tf 0 0 0 rg (decorator.dispatch_on ) Tj /F1 10 Tf 0 0 0 rg (tries to insert them ) Tj /F4 10 Tf (after ) Tj /F1 10 Tf (the base classes. I will give an) Tj T* 0 Tw (example showing the difference:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 85.42362 cm
+1 0 0 1 62.69291 80.22362 cm
q
q
1 0 0 1 0 0 cm
@@ -7570,74 +7568,40 @@ q
.662745 .662745 .662745 RG
.5 w
.960784 .960784 .862745 rg
-n -6 -6 468.6898 144 re B*
+n -6 -6 468.6898 72 re B*
Q
q
.960784 .960784 .862745 rg
-n 0 120 18 12 re f*
-.960784 .960784 .862745 rg
-n 24 120 138 12 re f*
-.960784 .960784 .862745 rg
-n 162 120 18 12 re f*
-.960784 .960784 .862745 rg
-n 24 108 294 12 re f*
-.960784 .960784 .862745 rg
-n 24 96 84 12 re f*
-.960784 .960784 .862745 rg
-n 114 96 6 12 re f*
-.960784 .960784 .862745 rg
-n 126 96 66 12 re f*
-.960784 .960784 .862745 rg
-n 192 96 6 12 re f*
-.960784 .960784 .862745 rg
-n 198 96 30 12 re f*
-.960784 .960784 .862745 rg
-n 228 96 6 12 re f*
-.960784 .960784 .862745 rg
-n 24 72 30 12 re f*
-.960784 .960784 .862745 rg
-n 60 72 6 12 re f*
-.960784 .960784 .862745 rg
-n 66 72 6 12 re f*
-.960784 .960784 .862745 rg
-n 72 72 36 12 re f*
-.960784 .960784 .862745 rg
-n 108 72 12 12 re f*
-.960784 .960784 .862745 rg
-n 48 60 24 12 re f*
+n 0 48 18 12 re f*
.960784 .960784 .862745 rg
-n 24 36 30 12 re f*
+n 24 48 138 12 re f*
.960784 .960784 .862745 rg
-n 60 36 6 12 re f*
-.960784 .960784 .862745 rg
-n 66 36 6 12 re f*
-.960784 .960784 .862745 rg
-n 72 36 6 12 re f*
+n 162 48 18 12 re f*
.960784 .960784 .862745 rg
-n 78 36 6 12 re f*
+n 24 36 294 12 re f*
.960784 .960784 .862745 rg
-n 84 36 30 12 re f*
+n 24 24 84 12 re f*
.960784 .960784 .862745 rg
-n 114 36 6 12 re f*
+n 114 24 6 12 re f*
.960784 .960784 .862745 rg
-n 126 36 6 12 re f*
+n 126 24 66 12 re f*
.960784 .960784 .862745 rg
-n 132 36 12 12 re f*
+n 192 24 6 12 re f*
.960784 .960784 .862745 rg
-n 48 24 18 12 re f*
+n 198 24 30 12 re f*
.960784 .960784 .862745 rg
-n 72 24 42 12 re f*
+n 228 24 6 12 re f*
.960784 .960784 .862745 rg
-n 114 24 6 12 re f*
+n 24 0 30 12 re f*
.960784 .960784 .862745 rg
-n 120 24 24 12 re f*
+n 60 0 6 12 re f*
.960784 .960784 .862745 rg
-n 144 24 12 12 re f*
+n 66 0 6 12 re f*
.960784 .960784 .862745 rg
-n 72 12 36 12 re f*
+n 72 0 36 12 re f*
.960784 .960784 .862745 rg
-n 114 12 6 12 re f*
-BT 1 0 0 1 0 122 Tm 12 TL /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (singledispatch_example2) Tj 0 0 0 rg (\(\):) Tj 0 0 0 rg T* ( ) Tj /F6 10 Tf .25098 .501961 .501961 rg (# adapted from functools.singledispatch test case) Tj /F3 10 Tf 0 0 0 rg T* ( ) Tj 0 0 0 rg (singledispatch) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (dispatch_on) Tj 0 0 0 rg (\() Tj .729412 .129412 .129412 rg ('arg') Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (class) Tj /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 0 1 rg (S) Tj /F3 10 Tf 0 0 0 rg (\() Tj 0 .501961 0 rg (object) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (pass) Tj /F3 10 Tf 0 0 0 rg T* T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (class) Tj /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 0 1 rg (V) Tj /F3 10 Tf 0 0 0 rg (\() Tj 0 0 0 rg (c) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (Sized) Tj 0 0 0 rg (,) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (S) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (__len__) Tj 0 0 0 rg (\() Tj 0 .501961 0 rg (self) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj .4 .4 .4 rg (0) Tj 0 0 0 rg T* T* ET
+n 108 0 12 12 re f*
+BT 1 0 0 1 0 50 Tm 12 TL /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (singledispatch_example2) Tj 0 0 0 rg (\(\):) Tj 0 0 0 rg T* ( ) Tj /F6 10 Tf .25098 .501961 .501961 rg (# adapted from functools.singledispatch test case) Tj /F3 10 Tf 0 0 0 rg T* ( ) Tj 0 0 0 rg (singledispatch) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (dispatch_on) Tj 0 0 0 rg (\() Tj .729412 .129412 .129412 rg ('arg') Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (class) Tj /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 0 1 rg (S) Tj /F3 10 Tf 0 0 0 rg (\() Tj 0 .501961 0 rg (object) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ET
Q
Q
Q
@@ -7646,12 +7610,12 @@ Q
endstream
endobj
-119 0 obj
-<< /Length 10875 >>
+120 0 obj
+<< /Length 12254 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 547.8236 cm
+1 0 0 1 62.69291 475.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -7661,10 +7625,44 @@ q
.662745 .662745 .662745 RG
.5 w
.960784 .960784 .862745 rg
-n -6 -6 468.6898 216 re B*
+n -6 -6 468.6898 288 re B*
Q
q
.960784 .960784 .862745 rg
+n 48 264 24 12 re f*
+.960784 .960784 .862745 rg
+n 24 240 30 12 re f*
+.960784 .960784 .862745 rg
+n 60 240 6 12 re f*
+.960784 .960784 .862745 rg
+n 66 240 6 12 re f*
+.960784 .960784 .862745 rg
+n 72 240 6 12 re f*
+.960784 .960784 .862745 rg
+n 78 240 6 12 re f*
+.960784 .960784 .862745 rg
+n 84 240 30 12 re f*
+.960784 .960784 .862745 rg
+n 114 240 6 12 re f*
+.960784 .960784 .862745 rg
+n 126 240 6 12 re f*
+.960784 .960784 .862745 rg
+n 132 240 12 12 re f*
+.960784 .960784 .862745 rg
+n 48 228 18 12 re f*
+.960784 .960784 .862745 rg
+n 72 228 42 12 re f*
+.960784 .960784 .862745 rg
+n 114 228 6 12 re f*
+.960784 .960784 .862745 rg
+n 120 228 24 12 re f*
+.960784 .960784 .862745 rg
+n 144 228 12 12 re f*
+.960784 .960784 .862745 rg
+n 72 216 36 12 re f*
+.960784 .960784 .862745 rg
+n 114 216 6 12 re f*
+.960784 .960784 .862745 rg
n 24 192 90 12 re f*
.960784 .960784 .862745 rg
n 24 180 18 12 re f*
@@ -7792,20 +7790,20 @@ n 66 0 6 12 re f*
n 72 0 6 12 re f*
.960784 .960784 .862745 rg
n 84 0 6 12 re f*
-BT 1 0 0 1 0 194 Tm 12 TL /F3 10 Tf 0 0 0 rg ( ) Tj .666667 .133333 1 rg (@singledispatch) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (g) Tj 0 0 0 rg (\() Tj 0 0 0 rg (arg) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("base") Tj 0 0 0 rg T* T* ( ) Tj .666667 .133333 1 rg (@g.register) Tj 0 0 0 rg (\() Tj 0 0 0 rg (S) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (g_s) Tj 0 0 0 rg (\() Tj 0 0 0 rg (arg) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("s") Tj 0 0 0 rg T* T* ( ) Tj .666667 .133333 1 rg (@g.register) Tj 0 0 0 rg (\() Tj 0 0 0 rg (c) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (Container) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (g_container) Tj 0 0 0 rg (\() Tj 0 0 0 rg (arg) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("container") Tj 0 0 0 rg T* T* ( ) Tj 0 0 0 rg (v) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (V) Tj 0 0 0 rg (\(\)) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (assert) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (g) Tj 0 0 0 rg (\() Tj 0 0 0 rg (v) Tj 0 0 0 rg (\)) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (==) Tj 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("s") Tj 0 0 0 rg T* ( ) Tj 0 0 0 rg (c) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (Container) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (register) Tj 0 0 0 rg (\() Tj 0 0 0 rg (V) Tj 0 0 0 rg (\)) Tj 0 0 0 rg ( ) Tj /F6 10 Tf .25098 .501961 .501961 rg (# add c.Container to the virtual mro of V) Tj /F3 10 Tf 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (assert) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (g) Tj 0 0 0 rg (\() Tj 0 0 0 rg (v) Tj 0 0 0 rg (\)) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (==) Tj 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("s") Tj 0 0 0 rg ( ) Tj /F6 10 Tf .25098 .501961 .501961 rg (# since the virtual mro is V, Sized, S, Container) Tj /F3 10 Tf 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (g) Tj 0 0 0 rg (,) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (V) Tj T* ET
+BT 1 0 0 1 0 266 Tm 12 TL /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 .501961 0 rg (pass) Tj /F3 10 Tf 0 0 0 rg T* T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (class) Tj /F3 10 Tf 0 0 0 rg ( ) Tj /F5 10 Tf 0 0 1 rg (V) Tj /F3 10 Tf 0 0 0 rg (\() Tj 0 0 0 rg (c) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (Sized) Tj 0 0 0 rg (,) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (S) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (__len__) Tj 0 0 0 rg (\() Tj 0 .501961 0 rg (self) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj .4 .4 .4 rg (0) Tj 0 0 0 rg T* T* ( ) Tj .666667 .133333 1 rg (@singledispatch) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (g) Tj 0 0 0 rg (\() Tj 0 0 0 rg (arg) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("base") Tj 0 0 0 rg T* T* ( ) Tj .666667 .133333 1 rg (@g.register) Tj 0 0 0 rg (\() Tj 0 0 0 rg (S) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (g_s) Tj 0 0 0 rg (\() Tj 0 0 0 rg (arg) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("s") Tj 0 0 0 rg T* T* ( ) Tj .666667 .133333 1 rg (@g.register) Tj 0 0 0 rg (\() Tj 0 0 0 rg (c) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (Container) Tj 0 0 0 rg (\)) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (def) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 1 rg (g_container) Tj 0 0 0 rg (\() Tj 0 0 0 rg (arg) Tj 0 0 0 rg (\):) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("container") Tj 0 0 0 rg T* T* ( ) Tj 0 0 0 rg (v) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (=) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (V) Tj 0 0 0 rg (\(\)) Tj 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (assert) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (g) Tj 0 0 0 rg (\() Tj 0 0 0 rg (v) Tj 0 0 0 rg (\)) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (==) Tj 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("s") Tj 0 0 0 rg T* ( ) Tj 0 0 0 rg (c) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (Container) Tj .4 .4 .4 rg (.) Tj 0 0 0 rg (register) Tj 0 0 0 rg (\() Tj 0 0 0 rg (V) Tj 0 0 0 rg (\)) Tj 0 0 0 rg ( ) Tj /F6 10 Tf .25098 .501961 .501961 rg (# add c.Container to the virtual mro of V) Tj /F3 10 Tf 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (assert) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (g) Tj 0 0 0 rg (\() Tj 0 0 0 rg (v) Tj 0 0 0 rg (\)) Tj 0 0 0 rg ( ) Tj .4 .4 .4 rg (==) Tj 0 0 0 rg ( ) Tj .729412 .129412 .129412 rg ("s") Tj 0 0 0 rg ( ) Tj /F6 10 Tf .25098 .501961 .501961 rg (# since the virtual mro is V, Sized, S, Container) Tj /F3 10 Tf 0 0 0 rg T* ( ) Tj /F5 10 Tf 0 .501961 0 rg (return) Tj /F3 10 Tf 0 0 0 rg ( ) Tj 0 0 0 rg (g) Tj 0 0 0 rg (,) Tj 0 0 0 rg ( ) Tj 0 0 0 rg (V) Tj T* ET
Q
Q
Q
Q
Q
q
-1 0 0 1 62.69291 479.8236 cm
+1 0 0 1 62.69291 407.8236 cm
q
BT 1 0 0 1 0 50 Tm 10.88816 Tw 12 TL /F1 10 Tf 0 0 0 rg (If you play with this example and replace the ) Tj /F3 10 Tf 0 0 0 rg (singledispatch ) Tj /F1 10 Tf 0 0 0 rg (definition with) Tj T* 0 Tw 2.720888 Tw /F3 10 Tf 0 0 0 rg (functools.singledispatch) Tj /F1 10 Tf 0 0 0 rg (, the assert will break: ) Tj /F3 10 Tf 0 0 0 rg (g ) Tj /F1 10 Tf 0 0 0 rg (will return ) Tj /F3 10 Tf 0 0 0 rg ("container" ) Tj /F1 10 Tf 0 0 0 rg (instead of ) Tj /F3 10 Tf 0 0 0 rg ("s") Tj /F1 10 Tf 0 0 0 rg (,) Tj T* 0 Tw .779147 Tw (because ) Tj /F3 10 Tf 0 0 0 rg (functools.singledispatch ) Tj /F1 10 Tf 0 0 0 rg (will insert the ) Tj /F3 10 Tf 0 0 0 rg (Container ) Tj /F1 10 Tf 0 0 0 rg (class right before ) Tj /F3 10 Tf 0 0 0 rg (S) Tj /F1 10 Tf 0 0 0 rg (. The only way) Tj T* 0 Tw .259431 Tw (to understand what is happening here is to scratch your head by looking at the implementations. I will just) Tj T* 0 Tw (notice that ) Tj /F3 10 Tf 0 0 0 rg (.dispatch_info ) Tj /F1 10 Tf 0 0 0 rg (is quite useful:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 422.6236 cm
+1 0 0 1 62.69291 350.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -7885,32 +7883,32 @@ Q
Q
Q
q
-1 0 0 1 62.69291 390.6236 cm
+1 0 0 1 62.69291 318.6236 cm
q
-BT 1 0 0 1 0 14 Tm 1.086136 Tw 12 TL /F1 10 Tf 0 0 0 rg (The current implementation does not implement any kind of cooperation between generic functions, i.e.) Tj T* 0 Tw (there is nothing akin to call-next-method in Lisp, nor akin to ) Tj /F3 10 Tf 0 0 0 rg (super ) Tj /F1 10 Tf 0 0 0 rg (in Python.) Tj T* ET
+BT 1 0 0 1 0 14 Tm 1.409147 Tw 12 TL /F1 10 Tf 0 0 0 rg (The current implementation does not implement any kind of cooperation between implementations, i.e.) Tj T* 0 Tw (there is nothing akin to call-next-method in Lisp, nor akin to ) Tj /F3 10 Tf 0 0 0 rg (super ) Tj /F1 10 Tf 0 0 0 rg (in Python.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 360.6236 cm
+1 0 0 1 62.69291 288.6236 cm
q
BT 1 0 0 1 0 14 Tm .22186 Tw 12 TL /F1 10 Tf 0 0 0 rg (Finally, let me notice that the decorator module implementation does not use any cache, whereas the one) Tj T* 0 Tw (in ) Tj /F3 10 Tf 0 0 0 rg (singledispatch ) Tj /F1 10 Tf 0 0 0 rg (has a cache.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 327.6236 cm
+1 0 0 1 62.69291 255.6236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Caveats and limitations) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 297.6236 cm
+1 0 0 1 62.69291 225.6236 cm
q
0 0 0 rg
BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .259431 Tw (One thing you should be aware of, is the performance penalty of decorators. The worse case is shown by) Tj T* 0 Tw (the following example:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 96.42362 cm
+1 0 0 1 62.69291 84.42362 cm
q
q
1 0 0 1 0 0 cm
@@ -7920,11 +7918,11 @@ q
.662745 .662745 .662745 RG
.5 w
.960784 .960784 .862745 rg
-n -6 -6 468.6898 192 re B*
+n -6 -6 468.6898 132 re B*
Q
q
0 0 0 rg
-BT 1 0 0 1 0 170 Tm /F3 10 Tf 12 TL ($ cat performance.sh) Tj T* (python3 -m timeit -s ") Tj T* (from decorator import decorator) Tj T* T* (@decorator) Tj T* (def do_nothing\(func, *args, **kw\):) Tj T* ( return func\(*args, **kw\)) Tj T* T* (@do_nothing) Tj T* (def f\(\):) Tj T* ( pass) Tj T* (" "f\(\)") Tj T* T* (python3 -m timeit -s ") Tj T* (def f\(\):) Tj T* ET
+BT 1 0 0 1 0 110 Tm /F3 10 Tf 12 TL ($ cat performance.sh) Tj T* (python3 -m timeit -s ") Tj T* (from decorator import decorator) Tj T* T* (@decorator) Tj T* (def do_nothing\(func, *args, **kw\):) Tj T* ( return func\(*args, **kw\)) Tj T* T* (@do_nothing) Tj T* (def f\(\):) Tj T* ET
Q
Q
Q
@@ -7933,12 +7931,12 @@ Q
endstream
endobj
-120 0 obj
-<< /Length 11972 >>
+121 0 obj
+<< /Length 11266 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 727.8236 cm
+1 0 0 1 62.69291 667.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -7948,24 +7946,24 @@ q
.662745 .662745 .662745 RG
.5 w
.960784 .960784 .862745 rg
-n -6 -6 468.6898 36 re B*
+n -6 -6 468.6898 96 re B*
Q
q
0 0 0 rg
-BT 1 0 0 1 0 14 Tm /F3 10 Tf 12 TL ( pass) Tj T* (" "f\(\)") Tj T* ET
+BT 1 0 0 1 0 74 Tm /F3 10 Tf 12 TL ( pass) Tj T* (" "f\(\)") Tj T* T* (python3 -m timeit -s ") Tj T* (def f\(\):) Tj T* ( pass) Tj T* (" "f\(\)") Tj T* ET
Q
Q
Q
Q
Q
q
-1 0 0 1 62.69291 707.8236 cm
+1 0 0 1 62.69291 647.8236 cm
q
BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (On my laptop, using the ) Tj /F3 10 Tf 0 0 0 rg (do_nothing ) Tj /F1 10 Tf 0 0 0 rg (decorator instead of the plain function is five times slower:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 650.6236 cm
+1 0 0 1 62.69291 590.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -7986,20 +7984,20 @@ Q
Q
Q
q
-1 0 0 1 62.69291 606.6236 cm
+1 0 0 1 62.69291 546.6236 cm
q
BT 1 0 0 1 0 26 Tm 1.25832 Tw 12 TL /F1 10 Tf 0 0 0 rg (It should be noted that a real life function would probably do something more useful than ) Tj /F3 10 Tf 0 0 0 rg (f ) Tj /F1 10 Tf 0 0 0 rg (here, and) Tj T* 0 Tw .91811 Tw (therefore in real life the performance penalty could be completely negligible. As always, the only way to) Tj T* 0 Tw (know if there is a penalty in your specific use case is to measure it.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 576.6236 cm
+1 0 0 1 62.69291 516.6236 cm
q
0 0 0 rg
BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .091984 Tw (More importantly, you should be aware that decorators will make your tracebacks longer and more difficult) Tj T* 0 Tw (to understand. Consider this example:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 519.4236 cm
+1 0 0 1 62.69291 459.4236 cm
q
q
1 0 0 1 0 0 cm
@@ -8043,13 +8041,13 @@ Q
Q
Q
q
-1 0 0 1 62.69291 487.4236 cm
+1 0 0 1 62.69291 427.4236 cm
q
BT 1 0 0 1 0 14 Tm .583318 Tw 12 TL /F1 10 Tf 0 0 0 rg (Calling ) Tj /F3 10 Tf 0 0 0 rg (f\(\) ) Tj /F1 10 Tf 0 0 0 rg (will give you a ) Tj /F3 10 Tf 0 0 0 rg (ZeroDivisionError) Tj /F1 10 Tf 0 0 0 rg (, but since the function is decorated the traceback will) Tj T* 0 Tw (be longer:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 358.2236 cm
+1 0 0 1 62.69291 298.2236 cm
q
q
1 0 0 1 0 0 cm
@@ -8197,38 +8195,44 @@ Q
Q
Q
q
-1 0 0 1 62.69291 290.2236 cm
+1 0 0 1 62.69291 230.2236 cm
q
BT 1 0 0 1 0 50 Tm 1.05528 Tw 12 TL /F1 10 Tf 0 0 0 rg (You see here the inner call to the decorator ) Tj /F3 10 Tf 0 0 0 rg (trace) Tj /F1 10 Tf 0 0 0 rg (, which calls ) Tj /F3 10 Tf 0 0 0 rg (f\(*args,) Tj ( ) Tj (**kw\)) Tj /F1 10 Tf 0 0 0 rg (, and a reference to) Tj T* 0 Tw .076457 Tw /F3 10 Tf 0 0 0 rg (File) Tj ( ) Tj (") Tj (<) Tj (string) Tj (>) Tj (",) Tj ( ) Tj (line) Tj ( ) Tj (2,) Tj ( ) Tj (in) Tj ( ) Tj (f) Tj /F1 10 Tf 0 0 0 rg (. This latter reference is due to the fact that internally the decorator) Tj T* 0 Tw 2.053318 Tw (module uses ) Tj /F3 10 Tf 0 0 0 rg (exec ) Tj /F1 10 Tf 0 0 0 rg (to generate the decorated function. Notice that ) Tj /F3 10 Tf 0 0 0 rg (exec ) Tj /F1 10 Tf 0 0 0 rg (is ) Tj /F4 10 Tf (not ) Tj /F1 10 Tf (responsibile for the) Tj T* 0 Tw 1.507485 Tw (performance penalty, since is the called ) Tj /F4 10 Tf (only once ) Tj /F1 10 Tf (at function decoration time, and not every time the) Tj T* 0 Tw (decorated function is called.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 164.2236 cm
+1 0 0 1 62.69291 116.2236 cm
q
-BT 1 0 0 1 0 110 Tm .932209 Tw 12 TL /F1 10 Tf 0 0 0 rg (At present, there is no clean way to avoid ) Tj /F3 10 Tf 0 0 0 rg (exec) Tj /F1 10 Tf 0 0 0 rg (. A clean solution would require to change the CPython) Tj T* 0 Tw .777485 Tw (implementation of functions and add an hook to make it possible to change their signature directly. That) Tj T* 0 Tw .74186 Tw (could happen in future versions of Python \(see PEP ) Tj 0 0 .501961 rg (362) Tj 0 0 0 rg (\) and then the decorator module would become) Tj T* 0 Tw 2.385318 Tw (obsolete. However, at present, even in Python 3.5 it is impossible to change the function signature) Tj T* 0 Tw 1.372485 Tw (directly, therefore the ) Tj /F3 10 Tf 0 0 0 rg (decorator ) Tj /F1 10 Tf 0 0 0 rg (module is still useful. Actually, this is the main reasons why I keep) Tj T* 0 Tw 2.169398 Tw (maintaining the module and releasing new versions. It should be noticed that in Python 3.5 a lot of) Tj T* 0 Tw 9.189147 Tw (improvements have been made: in that version you can decorated a function with) Tj T* 0 Tw .084147 Tw /F3 10 Tf 0 0 0 rg (func_tools.update_wrapper ) Tj /F1 10 Tf 0 0 0 rg (and ) Tj /F3 10 Tf 0 0 0 rg (pydoc ) Tj /F1 10 Tf 0 0 0 rg (will see the correct signature; still internally the function will) Tj T* 0 Tw 1.47748 Tw (have an incorrect signature, as you can see by using ) Tj /F3 10 Tf 0 0 0 rg (inspect.getfullargspec) Tj /F1 10 Tf 0 0 0 rg (: all documentation) Tj T* 0 Tw (tools using such function \(which has been correctly deprecated\) will see the wrong signature.) Tj T* ET
+BT 1 0 0 1 0 98 Tm .932209 Tw 12 TL /F1 10 Tf 0 0 0 rg (At present, there is no clean way to avoid ) Tj /F3 10 Tf 0 0 0 rg (exec) Tj /F1 10 Tf 0 0 0 rg (. A clean solution would require to change the CPython) Tj T* 0 Tw 2.348651 Tw (implementation of functions and add an hook to make it possible to change their signature directly.) Tj T* 0 Tw 2.793984 Tw (However, at present, even in Python 3.5 it is impossible to change the function signature directly,) Tj T* 0 Tw .329985 Tw (therefore the ) Tj /F3 10 Tf 0 0 0 rg (decorator ) Tj /F1 10 Tf 0 0 0 rg (module is still useful. Actually, this is the main reasons why I keep maintaining) Tj T* 0 Tw .042209 Tw (the module and releasing new versions. It should be noticed that in Python 3.5 a lot of improvements have) Tj T* 0 Tw 2.06998 Tw (been made: in that version you can decorated a function with ) Tj /F3 10 Tf 0 0 0 rg (func_tools.update_wrapper ) Tj /F1 10 Tf 0 0 0 rg (and) Tj T* 0 Tw 1.128735 Tw /F3 10 Tf 0 0 0 rg (pydoc ) Tj /F1 10 Tf 0 0 0 rg (will see the correct signature; still internally the function will have an incorrect signature, as you) Tj T* 0 Tw 1.10748 Tw (can see by using ) Tj /F3 10 Tf 0 0 0 rg (inspect.getfullargspec) Tj /F1 10 Tf 0 0 0 rg (: all documentation tools using such function \(which has) Tj T* 0 Tw (been correctly deprecated\) will see the wrong signature.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 110.2236 cm
+1 0 0 1 62.69291 86.22362 cm
q
-BT 1 0 0 1 0 38 Tm 1.043828 Tw 12 TL /F1 10 Tf 0 0 0 rg (In the present implementation, decorators generated by ) Tj /F3 10 Tf 0 0 0 rg (decorator ) Tj /F1 10 Tf 0 0 0 rg (can only be used on user-defined) Tj T* 0 Tw .152485 Tw (Python functions or methods, not on generic callable objects, nor on built-in functions, due to limitations of) Tj T* 0 Tw 2.15881 Tw (the ) Tj /F3 10 Tf 0 0 0 rg (inspect ) Tj /F1 10 Tf 0 0 0 rg (module in the standard library, especially for Python 2.X \(in Python 3.5 a lot of such) Tj T* 0 Tw (limitations have been removed\).) Tj T* ET
-Q
-Q
-q
-1 0 0 1 62.69291 80.22362 cm
-q
-BT 1 0 0 1 0 14 Tm .785777 Tw 12 TL /F1 10 Tf 0 0 0 rg (There is a restriction on the names of the arguments: for instance, if try to call an argument ) Tj /F3 10 Tf 0 0 0 rg (_call_ ) Tj /F1 10 Tf 0 0 0 rg (or) Tj T* 0 Tw /F3 10 Tf 0 0 0 rg (_func_ ) Tj /F1 10 Tf 0 0 0 rg (you will get a ) Tj /F3 10 Tf 0 0 0 rg (NameError) Tj /F1 10 Tf 0 0 0 rg (:) Tj T* ET
+BT 1 0 0 1 0 14 Tm 1.043828 Tw 12 TL /F1 10 Tf 0 0 0 rg (In the present implementation, decorators generated by ) Tj /F3 10 Tf 0 0 0 rg (decorator ) Tj /F1 10 Tf 0 0 0 rg (can only be used on user-defined ) Tj T* 0 Tw .152485 Tw (Python functions or methods, not on generic callable objects, nor on built-in functions, due to limitations of) Tj T* 0 Tw ET
Q
Q
endstream
endobj
-121 0 obj
-<< /Length 11599 >>
+122 0 obj
+<< /Length 12308 >>
stream
1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
q
-1 0 0 1 62.69291 655.8236 cm
+1 0 0 1 62.69291 741.0236 cm
+q
+BT 1 0 0 1 0 14 Tm 2.15881 Tw 12 TL /F1 10 Tf 0 0 0 rg (the ) Tj /F3 10 Tf 0 0 0 rg (inspect ) Tj /F1 10 Tf 0 0 0 rg (module in the standard library, especially for Python 2.X \(in Python 3.5 a lot of such) Tj T* 0 Tw (limitations have been removed\).) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 711.0236 cm
+q
+BT 1 0 0 1 0 14 Tm .785777 Tw 12 TL /F1 10 Tf 0 0 0 rg (There is a restriction on the names of the arguments: for instance, if try to call an argument ) Tj /F3 10 Tf 0 0 0 rg (_call_ ) Tj /F1 10 Tf 0 0 0 rg (or) Tj T* 0 Tw /F3 10 Tf 0 0 0 rg (_func_ ) Tj /F1 10 Tf 0 0 0 rg (you will get a ) Tj /F3 10 Tf 0 0 0 rg (NameError) Tj /F1 10 Tf 0 0 0 rg (:) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 593.8236 cm
q
q
1 0 0 1 0 0 cm
@@ -8330,14 +8334,14 @@ Q
Q
Q
q
-1 0 0 1 62.69291 623.8236 cm
+1 0 0 1 62.69291 561.8236 cm
q
0 0 0 rg
BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 1.720651 Tw (Finally, the implementation is such that the decorated function makes a \(shallow\) copy of the original) Tj T* 0 Tw (function dictionary:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 470.6236 cm
+1 0 0 1 62.69291 408.6236 cm
q
q
1 0 0 1 0 0 cm
@@ -8477,30 +8481,30 @@ Q
Q
Q
q
-1 0 0 1 62.69291 437.6236 cm
+1 0 0 1 62.69291 375.6236 cm
q
BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (LICENSE) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 419.6236 cm
+1 0 0 1 62.69291 357.6236 cm
q
0 0 0 rg
BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Copyright \(c\) 2005-2015, Michele Simionato All rights reserved.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 389.6236 cm
+1 0 0 1 62.69291 327.6236 cm
q
0 0 0 rg
BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 1.328555 Tw (Redistribution and use in source and binary forms, with or without modification, are permitted provided) Tj T* 0 Tw (that the following conditions are met:) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 383.6236 cm
+1 0 0 1 62.69291 321.6236 cm
Q
q
-1 0 0 1 62.69291 335.6236 cm
+1 0 0 1 62.69291 273.6236 cm
0 0 0 rg
BT /F1 10 Tf 12 TL ET
BT 1 0 0 1 0 2 Tm T* ET
@@ -8515,17 +8519,17 @@ q
Q
Q
q
-1 0 0 1 62.69291 335.6236 cm
+1 0 0 1 62.69291 273.6236 cm
Q
q
-1 0 0 1 62.69291 209.6236 cm
+1 0 0 1 62.69291 147.6236 cm
q
0 0 0 rg
BT 1 0 0 1 0 110 Tm /F1 10 Tf 12 TL .17998 Tw (THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND) Tj T* 0 Tw 2.911797 Tw (ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED) Tj T* 0 Tw 5.165529 Tw (WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE) Tj T* 0 Tw 1.395433 Tw (DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE) Tj T* 0 Tw 5.53122 Tw (FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL) Tj T* 0 Tw 2.705976 Tw (DAMAGES \(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR) Tj T* 0 Tw 3.868976 Tw (SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION\) HOWEVER) Tj T* 0 Tw 1.326647 Tw (CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR) Tj T* 0 Tw 1.525366 Tw (TORT \(INCLUDING NEGLIGENCE OR OTHERWISE\) ARISING IN ANY WAY OUT OF THE USE OF) Tj T* 0 Tw (THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.) Tj T* ET
Q
Q
q
-1 0 0 1 62.69291 179.6236 cm
+1 0 0 1 62.69291 117.6236 cm
q
0 0 0 rg
BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .407132 Tw (If you use this software and you are happy with it, consider sending me a note, just to gratify my ego. On) Tj T* 0 Tw (the other hand, if you use this software and you are unhappy with it, send me a patch!) Tj T* ET
@@ -8534,74 +8538,74 @@ Q
endstream
endobj
-122 0 obj
-<< /Nums [ 0 123 0 R 1 124 0 R 2 125 0 R 3 126 0 R 4 127 0 R
- 5 128 0 R 6 129 0 R 7 130 0 R 8 131 0 R 9 132 0 R
- 10 133 0 R 11 134 0 R 12 135 0 R 13 136 0 R 14 137 0 R
- 15 138 0 R 16 139 0 R 17 140 0 R 18 141 0 R 19 142 0 R ] >>
-endobj
123 0 obj
-<< /S /D /St 1 >>
+<< /Nums [ 0 124 0 R 1 125 0 R 2 126 0 R 3 127 0 R 4 128 0 R
+ 5 129 0 R 6 130 0 R 7 131 0 R 8 132 0 R 9 133 0 R
+ 10 134 0 R 11 135 0 R 12 136 0 R 13 137 0 R 14 138 0 R
+ 15 139 0 R 16 140 0 R 17 141 0 R 18 142 0 R 19 143 0 R ] >>
endobj
124 0 obj
-<< /S /D /St 2 >>
+<< /S /D /St 1 >>
endobj
125 0 obj
-<< /S /D /St 3 >>
+<< /S /D /St 2 >>
endobj
126 0 obj
-<< /S /D /St 4 >>
+<< /S /D /St 3 >>
endobj
127 0 obj
-<< /S /D /St 5 >>
+<< /S /D /St 4 >>
endobj
128 0 obj
-<< /S /D /St 6 >>
+<< /S /D /St 5 >>
endobj
129 0 obj
-<< /S /D /St 7 >>
+<< /S /D /St 6 >>
endobj
130 0 obj
-<< /S /D /St 8 >>
+<< /S /D /St 7 >>
endobj
131 0 obj
-<< /S /D /St 9 >>
+<< /S /D /St 8 >>
endobj
132 0 obj
-<< /S /D /St 10 >>
+<< /S /D /St 9 >>
endobj
133 0 obj
-<< /S /D /St 11 >>
+<< /S /D /St 10 >>
endobj
134 0 obj
-<< /S /D /St 12 >>
+<< /S /D /St 11 >>
endobj
135 0 obj
-<< /S /D /St 13 >>
+<< /S /D /St 12 >>
endobj
136 0 obj
-<< /S /D /St 14 >>
+<< /S /D /St 13 >>
endobj
137 0 obj
-<< /S /D /St 15 >>
+<< /S /D /St 14 >>
endobj
138 0 obj
-<< /S /D /St 16 >>
+<< /S /D /St 15 >>
endobj
139 0 obj
-<< /S /D /St 17 >>
+<< /S /D /St 16 >>
endobj
140 0 obj
-<< /S /D /St 18 >>
+<< /S /D /St 17 >>
endobj
141 0 obj
-<< /S /D /St 19 >>
+<< /S /D /St 18 >>
endobj
142 0 obj
+<< /S /D /St 19 >>
+endobj
+143 0 obj
<< /S /D /St 20 >>
endobj
xref
-0 143
+0 144
0000000000 65535 f
0000000075 00000 n
0000000162 00000 n
@@ -8654,102 +8658,103 @@ xref
0000008103 00000 n
0000008646 00000 n
0000008765 00000 n
-0000008944 00000 n
-0000009175 00000 n
-0000009380 00000 n
-0000009494 00000 n
-0000009611 00000 n
-0000009838 00000 n
-0000010076 00000 n
-0000010288 00000 n
-0000010500 00000 n
-0000010696 00000 n
-0000010927 00000 n
-0000011139 00000 n
-0000011351 00000 n
-0000011563 00000 n
-0000011775 00000 n
-0000011966 00000 n
-0000012197 00000 n
-0000012415 00000 n
-0000012646 00000 n
-0000012858 00000 n
-0000013070 00000 n
-0000013282 00000 n
+0000008945 00000 n
+0000009176 00000 n
+0000009381 00000 n
+0000009495 00000 n
+0000009612 00000 n
+0000009841 00000 n
+0000010079 00000 n
+0000010291 00000 n
+0000010503 00000 n
+0000010699 00000 n
+0000010930 00000 n
+0000011142 00000 n
+0000011354 00000 n
+0000011566 00000 n
+0000011778 00000 n
+0000011969 00000 n
+0000012200 00000 n
+0000012418 00000 n
+0000012649 00000 n
+0000012861 00000 n
+0000013073 00000 n
+0000013263 00000 n
0000013494 00000 n
-0000013706 00000 n
-0000013918 00000 n
-0000014113 00000 n
-0000014344 00000 n
-0000014556 00000 n
-0000014667 00000 n
-0000014915 00000 n
-0000014994 00000 n
-0000015111 00000 n
-0000015239 00000 n
-0000015381 00000 n
-0000015510 00000 n
-0000015652 00000 n
-0000015782 00000 n
-0000015917 00000 n
-0000016055 00000 n
-0000016192 00000 n
-0000016318 00000 n
-0000016452 00000 n
-0000016584 00000 n
-0000016725 00000 n
-0000016866 00000 n
-0000017019 00000 n
-0000017154 00000 n
-0000017311 00000 n
-0000017453 00000 n
-0000017566 00000 n
-0000017769 00000 n
-0000025390 00000 n
-0000032925 00000 n
-0000045489 00000 n
-0000062107 00000 n
-0000080682 00000 n
-0000098490 00000 n
-0000118904 00000 n
-0000137659 00000 n
-0000152372 00000 n
-0000166760 00000 n
-0000185132 00000 n
-0000201743 00000 n
-0000214158 00000 n
-0000231219 00000 n
-0000246005 00000 n
-0000259006 00000 n
-0000271116 00000 n
-0000282050 00000 n
-0000294081 00000 n
-0000305739 00000 n
-0000305997 00000 n
-0000306035 00000 n
-0000306073 00000 n
-0000306111 00000 n
-0000306149 00000 n
-0000306187 00000 n
-0000306225 00000 n
-0000306263 00000 n
-0000306301 00000 n
-0000306339 00000 n
-0000306378 00000 n
-0000306417 00000 n
-0000306456 00000 n
-0000306495 00000 n
-0000306534 00000 n
-0000306573 00000 n
-0000306612 00000 n
-0000306651 00000 n
-0000306690 00000 n
-0000306729 00000 n
+0000013684 00000 n
+0000013915 00000 n
+0000014127 00000 n
+0000014339 00000 n
+0000014551 00000 n
+0000014763 00000 n
+0000014874 00000 n
+0000015122 00000 n
+0000015201 00000 n
+0000015318 00000 n
+0000015446 00000 n
+0000015588 00000 n
+0000015717 00000 n
+0000015859 00000 n
+0000015989 00000 n
+0000016124 00000 n
+0000016262 00000 n
+0000016399 00000 n
+0000016525 00000 n
+0000016659 00000 n
+0000016791 00000 n
+0000016932 00000 n
+0000017073 00000 n
+0000017226 00000 n
+0000017361 00000 n
+0000017519 00000 n
+0000017662 00000 n
+0000017776 00000 n
+0000017979 00000 n
+0000025600 00000 n
+0000032883 00000 n
+0000045327 00000 n
+0000061191 00000 n
+0000078919 00000 n
+0000099111 00000 n
+0000119525 00000 n
+0000138280 00000 n
+0000153002 00000 n
+0000167390 00000 n
+0000185809 00000 n
+0000202420 00000 n
+0000214835 00000 n
+0000231896 00000 n
+0000245618 00000 n
+0000258764 00000 n
+0000270899 00000 n
+0000283212 00000 n
+0000294537 00000 n
+0000306904 00000 n
+0000307162 00000 n
+0000307200 00000 n
+0000307238 00000 n
+0000307276 00000 n
+0000307314 00000 n
+0000307352 00000 n
+0000307390 00000 n
+0000307428 00000 n
+0000307466 00000 n
+0000307504 00000 n
+0000307543 00000 n
+0000307582 00000 n
+0000307621 00000 n
+0000307660 00000 n
+0000307699 00000 n
+0000307738 00000 n
+0000307777 00000 n
+0000307816 00000 n
+0000307855 00000 n
+0000307894 00000 n
trailer
<< /ID
% ReportLab generated PDF document -- digest (http://www.reportlab.com)
- [(\030J\344-\350Q?\316/-\332\001\315\307\)\243) (\030J\344-\350Q?\316/-\332\001\315\307\)\243)]
- /Info 80 0 R /Root 79 0 R /Size 143 >>
+ [(\346+\235\330\333PxnN\374\026`\231\354? ) (\346+\235\330\333PxnN\374\026`\231\354? )]
+ /Info 81 0 R /Root 80 0 R /Size 144 >>
startxref
-306768
+307933
%%EOF