Skip to content

Commit 72797a6

Browse files
committed
reorder
1 parent 1cef96f commit 72797a6

File tree

10 files changed

+10
-37
lines changed

10 files changed

+10
-37
lines changed

06-Modules and Packages/00-Modules_and_Packages/MyMainPackage/SubPackage/__init__.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def sub_report():
2+
print("Hey Im a function inside mysubscript")

06-Modules and Packages/00-Modules_and_Packages/MyMainPackage/__init__.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def report_main():
2+
print("Hey I am in some_main_script in main package.")
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
# This is the module we will be importing from!
2-
# Great resource: https://docs.python.org/3/tutorial/modules.html
3-
4-
def func_in_mymodule():
5-
print("I am a function inside of the mymodule.py file!")
1+
def my_func():
2+
print("Hey I am in mymodule.py")
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,6 @@
1-
################
2-
# Example Three:
3-
################
4-
# Uncomment this and comment everything else to run!
1+
from MyMainPackage.some_main_script import report_main
2+
from MyMainPackage.SubPackage import mysubscript
53

6-
# import mymodule
7-
# mymodule.func_in_mymodule()
4+
report_main()
85

9-
################
10-
# Example Two:
11-
################
12-
# Uncomment this and comment everything else to run!
13-
14-
# import mymodule as mm
15-
# mm.func_in_mymodule()
16-
17-
################
18-
# Example Three:
19-
################
20-
# Uncomment this and comment everything else to run!
21-
22-
# from mymodule import func_in_mymodule
23-
# func_in_mymodule()
24-
25-
################
26-
# Example Four:
27-
################
28-
# Uncomment this and comment everything else to run!
29-
30-
# This is posisble but frowned upon, often causes poorly readable code because
31-
# you don't know what functions come from mymodule
32-
33-
# from mymodule import *
34-
# func_in_mymodule()
6+
mysubscript.sub_report()

0 commit comments

Comments
 (0)