[Numpy-discussion] packaging scipy (was Re: Simple financial functions for NumPy)
Christopher Barker
Chris.Barker at noaa.gov
Wed Apr 9 17:03:48 EDT 2008
Gael Varoquaux wrote:
>> the beginner, nor anyone else, should ever use "import *"
>
> Right! Sure. Tell this to a medical doctor who just wants to learn as
> little things as possible about a computer in order to process his MRI
> data and finish his PhD to never have to worry anymore with stupid things
> like programming language.
>
> "from foo import *" does have a usecase.
I still think that if someone is writing more than ten lines of code,
"import *" is a bad idea.
> It is suited only for small scripts,
There is a difference between scripting and programming, and you can do
either with Python. Indeed, that is one of its strengths.
> Some people do not want their scripts to scale or to last more than a day.
True, but is Python the best tool for that? I don't know. I I know I use
it, rather than Matlab, or bash, because I do want that scalability. I
also think it's better to be able to scale with it feeling like you're
learning a new language when you do so.
> The reason being that _I_ would be able develop my own module using the
> powerful feature of Python, but I could then give it to non technical
> users.
Then I suppose you can give them a ready to use environment, with the
relevant stuff to their problem already imported for them -- that could
be very useful.
Anyway, yes, there are use cases, but I think we should generally
advocate a more scalable style.
I have yet to advocate that the Matlab users in my group (The Scientists
that happen to need a bit of programming, but have no interest in it)
start using Python, but, frankly, "import *", and minor syntax like that
has nothing to do with it. Aside from the fact that they are already
familiar with Matlab, the big issues are the fact that there is no one
thing they can install to get an IDE, complete and well integrated
plotting, and extensive library of assorted functions.
Numpy+Scipy+MPL+Who-knows-what-editor are close, but the ease of use is
not there yet, and it's NOT because of too many namespaces.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the NumPy-Discussion
mailing list