We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a226251 commit ff1e25bCopy full SHA for ff1e25b
decorators/syntax.py
@@ -0,0 +1,39 @@
1
+# This is not a valid Python module - Don't run it.
2
+
3
+# ONE DECORATOR
4
+def func(arg1, arg2, ...):
5
+ pass
6
7
+func = decorator(func)
8
9
+# is equivalent to the following:
10
11
+@decorator
12
13
14
15
16
+# TWO DECORATORS
17
18
19
20
+func = deco1(deco2(func))
21
22
23
24
+@deco1
25
+@deco2
26
27
28
29
+# DECORATOR WITH ARGUMENTS
30
31
32
33
+func = decoarg(arg_a, arg_b)(func)
34
35
36
37
+@decoarg(arg_a, arg_b)
38
39
0 commit comments