Skip to content

Commit 2d49bc1

Browse files
committed
functional more
1 parent aa44183 commit 2d49bc1

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
print(
2+
max(1, 2, 3)
3+
)
4+
5+
print(
6+
max((1, 2, 3, 4))
7+
)
8+
9+
10+
def g():
11+
for i in range(10):
12+
yield i
13+
14+
15+
print(max(g()))
16+

playground/callable_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class A:
2+
def __init__(self):
3+
print('I am in __init__')
4+
5+
def __call__(self, *args, **kwargs):
6+
print('I am in __call__')
7+
8+
9+
if __name__ == '__main__':
10+
a = A()
11+
print('delimiter')
12+
a()

0 commit comments

Comments
 (0)