The REALLY bad thing about Python lists ..

Florian Weimer fw at deneb.cygnus.argh.org
Thu May 25 22:11:47 CEST 2000


Greg Ewing <greg at cosc.canterbury.ac.nz> writes:

> If you know that the operands will never be negative, declare them
> as unsigned so that the compiler has the chance to optimise. Or give
> the language another operator that complains about negative numbers.

Or use a language which has distinct integer types (i.e. integer types
with no automatic conversion between them).  Of course, this can lead
to type inflation, but in my experience, it helps to avoid a lot of
silly mistakes.



More information about the Python-list mailing list