f---ing typechecking

James Stroud jstroud at mbi.ucla.edu
Thu Feb 15 07:00:52 EST 2007


BJörn Lindqvist wrote:
> 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.
> 

They are widened by information content, not functionality. Tuples don't 
have any more information content than lists.



More information about the Python-list mailing list