lang comparison: in-place algorithm for reversing a list in Perl,Python, Lisp

Chris Angelico rosuav at
Fri Mar 2 08:11:29 CET 2012

On Fri, Mar 2, 2012 at 9:04 AM, Xah Lee <xahlee at> wrote:
> One easy
> way to measure it is whether a programer can read and understand a
> program without having to delve into its idiosyncrasies.

Neither the behavior of ints nor the behavior of IEEE floating point
is a "quirk" or an "idiosyncracy". These are data types with
well-defined semantics, and you need to understand them to use them.
The fact that dividing two positive integers and producing (or casting
to) a third integer rounds the result down is just as much a part of
the definition as is two's complement negatives, which most people can
safely ignore because they "just work" the way you expect.

Learn what you're working with, if you expect to get decent results from it.


More information about the Python-list mailing list