I am importing lots of functions from a module
Is it better to use
from my_module import function1, function2, function3, function4, function5, function6, function7
which is a little messy, but avoids flooding the current namespace with everything from that module or
from my_module import *
Which looks tidy but will fill the namespace with everything from that module.
Can’t find anything in PEP8 about what the limit for how much you should import by name is. Which is better and why?
If you really need that many functions, you are already polluting your namespace.
I would suggest:
Or, if my_module has a long name use an alias: