learnpython.org - an online interactive Python tutorial
Dotan Cohen
dotancohen at gmail.com
Sat Apr 23 12:51:51 EDT 2011
On Fri, Apr 22, 2011 at 09:38, harrismh777 <harrismh777 at charter.net> wrote:
> If an operation like (+) is used to add 1 + '1' then the string should be
> converted to int and the addition should take place, returning a reference
> to object int (2).
>
No, the int 1 should be cast to a string, and the result should be the
string '11'.
--
Dotan Cohen
http://gibberish.co.il
http://what-is-what.com
More information about the Python-list
mailing list