By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,403 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,403 IT Pros & Developers. It's quick & easy.

Import speeds

P: 17
I tried Googling around for this but I couldn't find anything useful.

I know Python caches modules so they only have to be imported once, but is there a performance hit when using the wildcard import? For example, is this...
Expand|Select|Wrap|Line Numbers
  1. from some_module import *
...slower than this?
Expand|Select|Wrap|Line Numbers
  1. import some_module
Thanks in advance.
Jan 3 '09 #1
Share this Question
Share on Google+
1 Reply

P: 2
In cases of large modules (like PyQt4), then yes, the wild card import is slower, as it takes all the objects and fills them into your current name-space.
Jan 4 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.