Magic function

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Sat Jan 12 08:40:16 EST 2008


Steven D'Aprano:
> As simple as the above is, it could be made simpler. Judging from the
> example given, the Bigobj constructor doesn't need a keyword argument,
> it could just as easily take an arbitrary number of arguments:
> bigobj = Bigobj(obj1, obj2, obj3, obj4...)

I agree; "Things should be made as simple as possible, but not any
simpler". Hiding those important details from the user is "too much
simple", and in the long run it will give problems.
They don't need to become expert (Python) programmers, but it's
positive for them to learn how to use their tools a bit, and that
example is simple.

For them Python is a good choice as a shell/interface/glue language
(despite the lack of built-in multiprecision floating point numbers
and TONS of other things you can find built-in in Mathematica, that is
quite less easy to program than Python), you can add MatPlotLib to
visualize data on the fly. In the future the Fortress language (by
Sun) may be good for them to use the CPU multi core CPUs too, etc. At
the moment Java/D/Cython/C may be used to write the numerically
intensive routines (and to interface to the already written ones in
Fortran/C/C++, etc) (note: Cython is a better version of Pyrex).

Bye,
bearophile



More information about the Python-list mailing list