PEP: possibility of inline using of a symbol instead of "import"

dmitrey dmitrey.kroshko at scipy.org
Thu Jan 6 11:03:35 EST 2011


Yes, I know, still usually it is placed in file header
On Jan 6, 5:57 pm, Tim Harig <user... at ilthio.net> wrote:

> Python doesn't require imports to be at the top of a file.  They can be
> imported at any time.
>
> > import MyModule
> > (...lots of code...)
> > r = MyModule.myFunc(...)
>
> (...lots of code...)
> import MyModule
> r = MyModule.myFunc(...)




More information about the Python-list mailing list