Re: Redundant importing of modules

2010-12-21 Thread bruno.desthuilli...@gmail.com
On 21 déc, 03:03, Steve Holden wrote: > On 12/20/2010 8:36 PM, Jshgwave wrote:> > > When writing a function that uses a module such as NumPy, it is tempting > > to include the statement "import numpy" or "import numpy as np" in the > > definition of the function, in case the  function is used in a

Re: Redundant importing of modules

2010-12-20 Thread Steve Holden
On 12/20/2010 8:36 PM, Jshgwave wrote: > When writing a function that uses a module such as NumPy, it is tempting > to include the statement "import numpy" or "import numpy as np" in the > definition of the function, in case the function is used in a script > that hasn't already imported NumPy. >

Redundant importing of modules

2010-12-20 Thread Jshgwave
When writing a function that uses a module such as NumPy, it is tempting to include the statement "import numpy" or "import numpy as np" in the definition of the function, in case the  function is used in a script that hasn't already imported NumPy. That could lead to the script issuing the "im