PEP0238 lament

Stephen Horne steve at lurking.demon.co.uk
Tue Jul 24 05:33:47 CEST 2001


On Mon, 23 Jul 2001 16:12:13 -0700, David Eppstein
<eppstein at ics.uci.edu> wrote:

>Maybe it would have been more type-safe to have defined a language in which
>string concatenation was defined by some other symbol ++, so that 
>"123"++"456" would equal "123456" but "123"+"456" would automagically 
>coerce the arguments into integers and return 579.  You could argue either 

Shutupshutupshutup - if you're not careful, they'll hear you - and
that's another codebreaking change in the queue. After all, Perl does
it so it *must* be right.

BTW, it's not just strings - how about [1,2,3] + [4,5,6]. Same thing
of course, but worth noting that strings aren't just a special case.




More information about the Python-list mailing list