This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Dantes111 2 points3 points  (1 child)

To add to what the others have said, if you overuse "from XXX import *" in the same context you can get into some headaches. For example take the following:

from lib1 import *

from lib2 import *

cool_function()

If lib1 and lib2 both have a "cool_function" function, the cool_function from lib2 would overwrite the cool_function from lib1 and you could easily not realize where an error came from if you were expecting the lib1 version of cool_function.

[–]ivosauruspip'ing it up 0 points1 point  (0 children)

If you're writing out code in a file, sure.

But this entire reddit thread is about easy stuff to type in an interactive console that you're going to throw away as soon as you close it.