You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"It is reasonable and often considered a best practice for Python modules to pre-import public API functions and classes into the init.py file. This approach allows users to access these elements directly from the top-level package (e.g., import mymodule; mymodule.function()), improving usability and intuitiveness, especially for libraries with multiple submodules.
While modern IDEs with autocompletion reduce the need for this practice, pre-importing still offers clear benefits for discoverability and user experience, as users don’t need to navigate submodules or guess where specific functionality resides."
But it does make sense for some API functions to be scoped in a submodule, e.g., the migration math functions. Let's create some rational rule for this so we do as much pre-importing as possible without feeling like it's all very ad hoc.
The text was updated successfully, but these errors were encountered:
"It is reasonable and often considered a best practice for Python modules to pre-import public API functions and classes into the init.py file. This approach allows users to access these elements directly from the top-level package (e.g., import mymodule; mymodule.function()), improving usability and intuitiveness, especially for libraries with multiple submodules.
While modern IDEs with autocompletion reduce the need for this practice, pre-importing still offers clear benefits for discoverability and user experience, as users don’t need to navigate submodules or guess where specific functionality resides."
But it does make sense for some API functions to be scoped in a submodule, e.g., the migration math functions. Let's create some rational rule for this so we do as much pre-importing as possible without feeling like it's all very ad hoc.
The text was updated successfully, but these errors were encountered: