[Python-Dev] Re: [I18n-sig] Unicode experience

Guido van Rossum guido@beopen.com
Fri, 07 Jul 2000 16:02:16 -0500

> > 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.

Really?  Does 3+"" really convert the 3 to a string in Java?

> C++, depending on the type. Python's strictness
> about this issue has never caught a bug for me. It has only caused
> errors.

Are you sure?  This is the kind of error where you immediately see
what's wrong and move on to the next bug.

> 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.

I won't argue with you there :-)

--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)