-
-
Notifications
You must be signed in to change notification settings - Fork 768
Expand file tree
/
Copy pathfolding2.py
More file actions
56 lines (37 loc) · 785 Bytes
/
folding2.py
File metadata and controls
56 lines (37 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""Module level docstring.
Multi line.
Docstring.
"""
import math
import functools
def dec_logger(func):
"""One liner."""
@functools.wraps(func)
def wrapper(*arg, **kargs):
"""Imperative one liner."""
result = func(*arg, **kargs)
print(result)
return result
return wrapper
def n1(x): # noqa
"""Multi line
Docstring.
"""
a = x + 1
def n2(y):
"""Single line docstring."""
@dec_logger
def n3(z):
"""Have multiline.
Docstring
As
Well
"""
# Leave some blank spaces
return str(z) + 'expanded'
b = y + 1
n3(b)
return b
n2(a)
if __name__ == '__main__':
n1(math.pi)