Skip to content

Commit 952e854

Browse files
committed
Eg2
1 parent c51ac50 commit 952e854

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# main.py
2+
import module1
3+
4+
# even though test was added to sys.modules
5+
# in module1, we can still access it from here
6+
import test
7+
8+
print(test())
9+
10+
# don't do this! It's a bad hack to illustrate how import looks
11+
# in sys.modules for the symbol we are importing
12+
13+

0 commit comments

Comments
 (0)