-1

In e.g.

from sympy import *

what is the meaning of import *?

jmkjaer
  • 1,019
  • 2
  • 12
  • 29
  • 3
    This is really basic stuff that is covered in the python [tutorial](https://docs.python.org/3/tutorial/index.html). See the section [Importing * From a Package](https://docs.python.org/3/tutorial/modules.html#importing-from-a-package). – tdelaney Mar 28 '20 at 16:47
  • Does this answer your question? [What exactly does "import \*" import?](https://stackoverflow.com/questions/2360724/what-exactly-does-import-import) – Gino Mempin Mar 29 '20 at 09:44

1 Answers1

2

It simply says that you want all of the module's variables imported into your module's namespace. if scipy has a variable foo, you get the same object with the same name in your module's "global" namespace. Modules can modify what "all" means using the special variable __all__.

tdelaney
  • 73,364
  • 6
  • 83
  • 116