Suppose I read code written by someone else where “from import *” is used, how can I determine what module a function is from? Is this the reason why some people frown upon “from import *”?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, this is why
from <module> import *is considered bad style. What you can do is remove these*imports one by one, then check whichNameErrors you get and solve them one by one by explicit imports.