Created
December 21, 2019 15:32
-
-
Save FerdinaKusumah/36d3c3f0456010205ab19b9b0b6dd7ad to your computer and use it in GitHub Desktop.
Underscore Python
This file contains hidden or 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
# This is example_module.py: | |
def external_func(): | |
return 23 | |
def _internal_func(): | |
return 42 | |
>>> from example_module import * | |
>>> external_func() | |
23 | |
>>> _internal_func() | |
NameError: "name '_internal_func' is not defined" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment