f---ing typechecking
BJörn Lindqvist
bjourne at gmail.com
Thu Feb 15 04:15:56 EST 2007
On 2/15/07, James Stroud <jstroud at mbi.ucla.edu> wrote:
> I guess we differ on what is obvious. This seems obvious to me:
>
> [1] + (1,) => [1, 1]
> (1,) + [1] => (1, 1)
I agreed with you up to this point. But this seems more obvious to me:
[1] + (1,) => [1, 1]
(1,) + [1] => [1, 1]
In other languages and situations, types are widened, 1 + 1.0 = 1.0 +
1.0. And list is "wider" than tuple.
--
mvh Björn
More information about the Python-list
mailing list