How to import all things defined the files in a module directory in __init__.py?

Chris Angelico rosuav at gmail.com
Sat Sep 24 10:25:43 EDT 2016


On Sat, Sep 24, 2016 at 9:32 PM, Brendan Abel <007brendan at gmail.com> wrote:
>> Splitting it up would make it slower to load.
>
> It's usually the opposite.  When packages are split up, you only have to
> load the specific portions you need.  Putting it all in a single module
> forces you to always load everything.

This can be true ONLY if they're sufficiently separate that most users
can pick and choose. If the bulk of users are going to need every
piece, the split will slow it down significantly.

ChrisA



More information about the Python-list mailing list