As far as I understand, in Python there are 3 ways to import:
from name_module import name_class
import name_module
from name_module import *
In all other ways, there is no point, as if this class is already in our module. But for some reason they do not recommend using the third way, explaining this by the fact that there is a possibility of a name conflict between the names of the imported module's class and the module in which we are located.
- Why does this not happen when we import the 2nd way. After all, there and there is the import of the entire file and the creation of the same variables in our namespace or not?
- What is better to use in what case?