The REALLY bad thing about Python lists ..

Robin Becker robin at
Tue May 23 16:02:23 CEST 2000

In article <392A8035.5C2A2BAA at>, Ivan Van Laningham
<ivanlan at> writes
>Hi All--
>> (Under what circumstances would you want to use % on negative numbers?
>> I can't think of any.)
>Calendrical mathematics often has a use for negative modulo.  However,
>it's an easy matter to check the inputs and set the sign on the answer.
><zero-minus-one>-ly y'rs,
also many algorithms want to do angle = angle % 360 and expect something
in the range 0-359.99999999...
Robin Becker

More information about the Python-list mailing list