logoalt Hacker News

OutOfHereyesterday at 7:12 PM2 repliesview on HN

Please never use `from something import *`, not even for a demo. It is not explicit, not maintainable, and goes against all Python guidelines. Certainly never expect any user to use it either.


Replies

cl3mischyesterday at 7:46 PM

FWIW the afaik most common symbolic math Python library sympy does that on the first page of their tutorial. I think in this space it's pretty common.

https://docs.sympy.org/latest/tutorials/intro-tutorial/intro...

I have to admit that I still like to use the ancient

    from pylab import *
in scripts that only I will ever see. It makes it so much easier to use numpy in a "tool of thought" way. I would never do this in a library, though.
show 1 reply
marcelbundleyesterday at 8:22 PM

You would be suprised on how many large scale project I saw this beauty lamao, not saying that this is okay, people just dgaf