zip or marry etc

Robin Becker robin at jessikat.fsnet.co.uk
Tue Jul 18 20:00:14 EDT 2000


In message <3974E341.58FC8939 at roguewave.com>, Bjorn Pettersen
<bjorn at roguewave.com> writes
>Robin Becker wrote:
>> 
>> I suppose there must be something desperately wrong with using the
>> __mul__ for sequences to indicate the set pairwise product. I would
>> certainly be for
>> 
>> x,y in A*B rather than x,y in zip(A,B) or marry(A,B), but since * is the
>> obvious operator it must be that someone else has reserved it.
>
>if A is of a class defining __mul__ (or B is of a class defining
>__rmul__) you'll have problems.
>
>How about A @ B... <wink>
>
>running-and-hiding'ly y'rs
>-- bjorn
>
I thought maybe these were just lists or tuples sigh :(
-- 
Robin Becker




More information about the Python-list mailing list