+ 1

Why is there a rule in PEP: don't use «from module import *»?

Told me pls: WHY?

12th Aug 2021, 6:15 AM
Григорий Коротенко
Григорий Коротенко - avatar
2 Antworten
+ 4
The problem is that different modules can use the same names for stuff. If you just import everything from modules this will lead to naming conflicts that can seriously screw things up.
12th Aug 2021, 6:22 AM
Simon Sauter
Simon Sauter - avatar
+ 1
Thanks
12th Aug 2021, 6:23 AM
Григорий Коротенко
Григорий Коротенко - avatar