1min.

1MIN · PYTHON

A Python proposal would make standard-library imports explicit

A local file named random.py can accidentally hide Python’s standard-library module because both occupy the same import namespace. At the Python Language Summit, Pablo Galindo proposed an explicit std namespace, allowing imports such as from std import random. The report explains the motivation and compatibility discussion; this is a proposal, not syntax you can use in current stable Python.

Python Software Foundation · Sep 30, 2026

Why it matters

Import failures can originate in naming and search paths rather than in the library itself.

More context

Read this earlier summit report for the design tradeoff. Python’s existing -P option avoids prepending potentially unsafe paths, but changing path behavior can affect projects that rely on it.

Keep in mind

No acceptance or delivery date for the proposed namespace is established by this report.

Original read

More engineering ideas, one minute at a time.

Explore more stories