-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create a conflict with standard module
- Loading branch information
1 parent
27f4f25
commit 551caff
Showing
2 changed files
with
11 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import message.message_provider | ||
import string.message_provider | ||
|
||
print(type(message)) | ||
print(dir(message)) | ||
print(type(message.message_provider)) | ||
print(dir(message.message_provider)) | ||
print(message.message_provider.get_message()) | ||
print(type(string)) | ||
print(dir(string)) | ||
print(type(string.message_provider)) | ||
print(dir(string.message_provider)) | ||
print(string.message_provider.get_message()) | ||
|
||
# PS C:\WORK\dragondive\heavens-arena\python\modules> python main.py | ||
# <class 'module'> | ||
# ['__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'message_provider'] | ||
# <class 'module'> | ||
# ['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'get_message'] | ||
# Hello World | ||
# PS C:\WORK\dragondive\heavens-arena\python\modules> python main.py | ||
# Traceback (most recent call last): | ||
# File "C:\WORK\dragondive\heavens-arena\python\modules\main.py", line 1, in <module> | ||
# import string.message_provider | ||
# ModuleNotFoundError: No module named 'string.message_provider'; 'string' is not a package |
File renamed without changes.