Skip to content

Commit f63d13c

Browse files
committed
Class9, exercise3
1 parent 54462a1 commit f63d13c

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from mytest.world import func1
2+
from mytest.simple import func2
3+
from mytest.whatever import func3
4+
5+
__all__ = ('func1', 'func2', 'func3')
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'''
2+
Python class on writing reusable code
3+
'''
4+
def func2():
5+
'''Simple test function'''
6+
print "Simple"
7+
8+
if __name__ == "__main__":
9+
print "Main program - simple"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'''
2+
Python class on writing reusable code
3+
'''
4+
def func3():
5+
'''Simple test function'''
6+
print "Whatever"
7+
8+
if __name__ == "__main__":
9+
print "Main program - whatever"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'''
2+
Python class on writing reusable code
3+
'''
4+
def func1():
5+
'''Simple test function'''
6+
print "Hello world"
7+
8+
if __name__ == "__main__":
9+
print "Main program - world"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
$ python
3+
>>> from mytest import *
4+
>>> func1()
5+
Hello world
6+
>>> func2()
7+
Simple
8+
>>> func3()
9+
Whatever
10+
>>>
11+

0 commit comments

Comments
 (0)