| 1 | What does the `if __name__ == '__main__':` idiom accomplish, and why is it important for modules? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 2 | How does Python locate modules during import, and what is sys.path's role? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 3 | How do entry points in packaging metadata enable a package to register CLI commands or plugins? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 4 | What is the difference between a module and a package in Python? Python › Modules & Packaging | Python | Modules & Packaging | Beginner |
| 5 | What does the __init__.py file do inside a package directory? Python › Modules & Packaging | Python | Modules & Packaging | Beginner |
| 6 | How does Python's module import system avoid re-executing a module multiple times when imported from different places? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 7 | What is the difference between an absolute import and a relative import within a package? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 8 | How does pyproject.toml serve as the modern standard for defining a Python package's build configuration and dependencies? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 9 | What is __all__ and how does it control `from module import *` behavior? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 10 | What is the purpose of a `requirements.txt` file, and how does it differ from dependency declarations in pyproject.toml? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 11 | What does 'editable install' (pip install -e .) mean, and why is it useful during development? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 12 | What is a namespace package, and how does it differ from a regular package? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 13 | How does Python resolve circular imports, and what strategies avoid the resulting ImportError? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 14 | How does importlib let you dynamically import a module by name at runtime? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 15 | How does the module search and caching system handle submodule imports like `import package.subpackage.module`? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 16 | How do you build a plugin-style CLI where subcommands are dynamically discovered and registered from separate modules, rather than hardcoded? Python › Command-Line Interfaces (argparse) | Python | Command-Line Interfaces (argparse) | Advanced |
| 17 | What does logging.basicConfig() do, and what are its common pitfalls? Python › Logging | Python | Logging | Beginner |
| 18 | How do you use pathlib.Path for modern, object-oriented file path manipulation instead of os.path's string-based functions? Python › File I/O & Context Managers | Python | File I/O & Context Managers | Intermediate |
| 19 | Why is it recommended to use logging.getLogger(__name__) instead of the root logger in library and module code? Python › Logging | Python | Logging | Intermediate |
| 20 | How do you configure logging using a dictionary via logging.config.dictConfig? Python › Logging | Python | Logging | Intermediate |
| 21 | What's the difference between propagate=True and propagate=False on a logger? Python › Logging | Python | Logging | Intermediate |
| 22 | How do you group related arguments visually in the generated --help output using argument groups? Python › Command-Line Interfaces (argparse) | Python | Command-Line Interfaces (argparse) | Advanced |
| 23 | How would you build a CLI tool where some arguments can also be set via environment variables, falling back to a default if neither is provided? Python › Command-Line Interfaces (argparse) | Python | Command-Line Interfaces (argparse) | Advanced |
| 24 | How do you customize argparse's automatically-generated usage and help text formatting, like preserving specific line breaks in the description? Python › Command-Line Interfaces (argparse) | Python | Command-Line Interfaces (argparse) | Advanced |
| 25 | How would you build a decorator-based plugin/registration system, similar to how Flask's @app.route() registers view functions? Python › Decorators | Python | Decorators | Advanced |
| 26 | How does logging.NullHandler help library authors avoid the 'No handlers could be found' warning? Python › Logging | Python | Logging | Advanced |