Does a leading "_" in a module name mean "internal"? #1429
-
Is there a reason why many of the modules that have leading "internal" underscores? When I see "_", I assume that that I should not use the things within. For example:
But, maybe there's some other meaning that I don't know about. Do the leading underscores for modules mean "internal"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think the idea behind this design is that you should import/use things exposed from init files, which themselves will import functions from the modules with underscores. |
Beta Was this translation helpful? Give feedback.
I think the idea behind this design is that you should import/use things exposed from init files, which themselves will import functions from the modules with underscores.
This allons to define whats part of the "public" API, which can be subject to deprecation etc..
Importing straight from _***.py module is not very practical/pythonic either.