What’s the rationale behind not allowing * in relative imports? e.g.
from ..new_tool import *
or doing a relative import directly:
import ..new_tool
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.
The reason the latter is prohibited is that
..new_toolis not usable in an expression (PEP 328):Since
*-imports should only ever be a quick hack while in development, I suspect the functionality for relative*-imports was left out because it’s not necessary.