Skip to main content Brad's PyNotes

Posts on Modules

  1. PEP 420 - Implicit Namespace Packages

    TL;DR

    PEP 420 introduced implicit namespace packages, allowing Python packages to be split across multiple directories without requiring an __init__.py file. The import machinery automatically discovers and combines all portions of the package, enabling flexible distribution and avoiding file conflicts.

  2. Tutorial: Stdlib Tour

    TL;DR

    Python’s standard library provides essential modules for OS operations, file handling, math, networking, dates, and performance measurement - “batteries included”!

    Interesting!

    Python’s standard library is so comprehensive that many tasks don’t require external dependencies - from web requests to compression, it’s all built-in!

  3. Tutorial: Organizing and Reusing Code with Python Modules

    TL;DR

    Python modules are files containing Python code that can be imported and reused, organized into packages (directories with init.py), with various import styles (import, from…import, as) and special attributes like name and all.