Python less error-prone than Java

Christoph Zwerschke cito at online.de
Mon Jun 5 05:59:36 EDT 2006


Martin v. Löwis wrote:
> In Python 2.4 and later, you could write
> 
> def Distance(t1, t0, maxint=(1<<32)-1):
>   return (t1-t0) & maxint

No, this function behaves differently. It never returns a negative 
value. The only difference in Python 2.4 is that 1<<32 was 0 before.

-- Christoph



More information about the Python-list mailing list