help on "from deen import *" vs. "import deen"

Nathan Ernst nathan.ernst at gmail.com
Thu Nov 17 21:14:46 EST 2016


I would also toss in there: never name a script test.py. Causes nothing but
trouble, at least in python2.

On Nov 17, 2016 8:01 PM, <jfong at ms4.hinet.net> wrote:

> Steven D'Aprano at 2016/11/17 4:04:04PM wrote:
> > The most important thing you should learn from this thread is:
> >
> > - avoid using "from module import *" as it is usually more trouble
> >   than it is worth.
> >
> >
> > It is confusing and leads to more problems than it solves. If Python was
> being
> > invented now, rather than 20 years ago, I would expect that there would
> be no
> > "import *" in the language.
>
> It's the greatest advice I ever had in Python:-)
>
> --Jach
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list