Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __import__ #41

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add __import__ #41

wants to merge 1 commit into from

Conversation

bswck
Copy link

@bswck bswck commented Sep 10, 2024

I imagine a script illustrating __import__ should:

  • show how all import X/import X.Y/from X import Y (and other variants) work under the hood with __import__
  • highlight that __import__ != importlib.import_module
  • mention importlib._bootstrap.__import__
  • present the caching mechanism of modules
  • optionally show module lock acquires/releases
  • whatever else you suggest

@bswck
Copy link
Author

bswck commented Sep 10, 2024

Ideally, it could somehow be fluently transitioned into an overview of __package__, __path__ (and other module-level globals) and the entire import system (with mentions of sys.meta_path, sys.path, sys.path_hooks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant