[Python-Dev] Re: [I18n-sig] Unicode experience
Paul Prescod
paul@prescod.net
Fri, 07 Jul 2000 13:08:47 -0500
Guido van Rossum wrote:
>
> ...
>
> For strings there is no compact notation like "+0.0" if you want to
> convert to string or Unicode -- adding "" might work in Perl, but not
> in Python.
Actually, these days, foo+"" works in a LOT of languages. Perl, Java and
JavaScript for sure. C++, depending on the type. Python's strictness
about this issue has never caught a bug for me. It has only caused
errors. Okay, some newbie may think that "5"+"5"=="10". But they could
also expect [5]+[5]==[10]. There are limits to the extent that we can
protect them from incorrect mental models.
--
Paul Prescod - Not encumbered by corporate consensus
Pop stars come and pop stars go, but amid all this change there is one
eternal truth: Whenever Bob Dylan writes a song about a guy, the guy is
guilty as sin.
- http://www.nj.com/page1/ledger/e2efc7.html