Extracting values from text file

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sun Jun 18 18:54:32 CEST 2006


In <e73sof$rjs$1 at mlucom4.urz.uni-halle.de>, Mirco Wahab wrote:

> You see the picture? Pythons designer made the
> same mistake as the Java/Javascript designer -
> they use the _same_ operator (+) for number _addition_
> and string _concatenation_, which is, imho, cumbersome.

And ``+`` means also list/tuple concatenation and really anything for user
defined types.

> If you have an operator with meaning "add numbers" (+)
> and one for "add strings" (.), the language could then
> do the obvious for you.

The dot also has already a meaning, it's the attribute lookup operator.

> Why would one go from C/C++ to "dynamical typed"
> things, if he has to be so explicit on easy
> things?

Strings that act sometimes as strings and sometimes as numbers when used
with ``+`` are quite confusing.  Two relevant lines from the Zen of Python:

Explicit is better than implicit.
In the face of ambiguity, refuse the temptation to guess.

And don't mix up weakly and dynamically typed.  Python is dynamically and
strictly typed.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list