-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdemo.py
More file actions
48 lines (34 loc) · 764 Bytes
/
demo.py
File metadata and controls
48 lines (34 loc) · 764 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
print('hello world')
for item in [1,2,3,4,5,6,'foo','bar','baz']:
print('eh')
class MyCustomClass(object):
arg = None
def __init__(arg):
self.arg = arg
def my_method(self):
return self.arg + 1
def more_python(self):
return 1 + 1 + 2
def new_method():
return self.arg * arg
def asdf_asdf():
return "asdf"
def even_more_python(self):
return 1 + 3 + 4
@custom_generator
def generator_example(n):
run = 0
while run < 1000:
run = run + 1
yield run
@classmethod
def get_my_demos_done():
return False
@classmethod
def more_things():
return True
@classmethod
def asdfasdfdsa():
return "asdf"
def custom_generator(func):
return func()