Re: [openstack-dev] [all] warning about __init__ importing modules - fast CLIs

2015-03-16 Thread Boris Pavlovic
Robert, Thanks for sharing this! Now I know how to speed up start of Rally ;) Best regards, Boris Pavlovic On Tue, Mar 17, 2015 at 2:23 AM, Robert Collins wrote: > So, one of the things that we sometimes do in an __init__.py is this: > > all = ["submodule"] > import submodule > > This means

[openstack-dev] [all] warning about __init__ importing modules - fast CLIs

2015-03-16 Thread Robert Collins
So, one of the things that we sometimes do in an __init__.py is this: all = ["submodule"] import submodule This means users can do import mymodule mymodule.submodule and it works. This is actually a bit of an anti-pattern in the Python space, because to import mymodule.othersubmodule we'll alw