Extracting values from text file
randhol+valid_for_reply_from_news at pvv.org
Sun Jun 18 21:20:21 CEST 2006
On Sun, 18 Jun 2006 17:46:43 +0200
Mirco Wahab <wahab at chemie.uni-halle.de> wrote:
> Thus spoke Preben Randhol (on 2006-06-18 13:34):
> > On Sun, 18 Jun 2006 10:54:01 +0200
> > Mirco Wahab <wahab at chemie.uni-halle.de> wrote:
> >> - no DWIM-ism (do what I mean) on 'value' addition
> > But you don't add two values. you add two strings. If you
> > want numbers you must convert the strings.
> Why? At least - if its obvious, what I want.
If I say: I want something to eat.
Can you know if I want a dessert or a dinner ? ;-)
My point is that you don't specify. In your case you show that pyhton
is polymorphic, and that can have side-effects... Since in Python
you cannot define what type a function should accept you can throw
anything to it and it will happily much at it as best it can.
Computers are dumb and it is better that one give them enough
instructions than to let them second guess you IMHO....
My other language of choice is Ada. Ada is quite the opposite of
Python in being a very strictly typed language. It takes some getting
used to Python for me ;-) In my opinion Ada95 & Ada2005 got strict
typing correct, while Java only partially is strictly typed. C/C++ is
not. Anyway Ada and Python has different targets so I can happily play
with both static and dynamic typing.
I can recommend Ada as it will teach you to a very good programming
style that can be used when using other language.
More information about the Python-list