26 questions for “Modules & Packaging”

Found in 1 field. Select a question to see its full answer.

Information Technology

26 questions in 1 technology

#QuestionTechnologyTopicLevel
1What does the `if __name__ == '__main__':` idiom accomplish, and why is it important for modules? Python › Modules & PackagingPythonModules & PackagingIntermediate
2How does Python locate modules during import, and what is sys.path's role? Python › Modules & PackagingPythonModules & PackagingAdvanced
3How do entry points in packaging metadata enable a package to register CLI commands or plugins? Python › Modules & PackagingPythonModules & PackagingAdvanced
4What is the difference between a module and a package in Python? Python › Modules & PackagingPythonModules & PackagingBeginner
5What does the __init__.py file do inside a package directory? Python › Modules & PackagingPythonModules & PackagingBeginner
6How does Python's module import system avoid re-executing a module multiple times when imported from different places? Python › Modules & PackagingPythonModules & PackagingIntermediate
7What is the difference between an absolute import and a relative import within a package? Python › Modules & PackagingPythonModules & PackagingIntermediate
8How does pyproject.toml serve as the modern standard for defining a Python package's build configuration and dependencies? Python › Modules & PackagingPythonModules & PackagingIntermediate
9What is __all__ and how does it control `from module import *` behavior? Python › Modules & PackagingPythonModules & PackagingIntermediate
10What is the purpose of a `requirements.txt` file, and how does it differ from dependency declarations in pyproject.toml? Python › Modules & PackagingPythonModules & PackagingIntermediate