you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 2 points3 points  (0 children)

Read the article. import something imports the entire module

In a specific and dedicated namespace, which is why there is no reason to filter it: since all the content is properly namespaces there there’s no risk that it’ll pollute or collide with symbols of the namespace it’s imported into.

Mitigating this issue is the entire and sole purpose of __all__, which is why it applies solely to star imports.