restriction on sum: intentional bug?
Alan G Isaac
alan.isaac at gmail.com
Sat Oct 17 03:41:26 CEST 2009
On 10/16/2009 8:16 PM, Terry Reedy wrote:
> The fact that two or three people who agree on something agree on the
> thing that they agree on confirms nothing. One could just as well argue
> that summing anything but numbers is semantically incoherent, not
> correct. Certainly, my dictionary points in that direction.
Come on now, that is just a silly argument.
And dictionaries are obviously irrelevant;
that is a sophomoric (literally) argument.
Of course the numbers do not matter.
The *reasons* matter.
And by citing Tim and Peter, I was pointing
to their quite specific *reasons*.
The only serious reason that has been offered
for the current behavior is that people who do
not know better will sum strings instead of
joining them, which is more efficient. That is
a pretty weak argument for breaking expectations
and so refusing to do duck typing that an error
is raise. Especially in a language like Python.
(As Tim and Peter make clear.)
More information about the Python-list