osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?


Paul Rubin <no.email at nospam.invalid> writes:

>     Python 3.7.3 (default, Apr  3 2019, 05:39:12)
>     Type "help", "copyright", "credits" or "license" for more information.
>     >>> a = range(10)
>     >>> b = reversed(a)
>     >>> sum(a) == sum(b)
>     True
>     >>> sum(b) == sum(a)
>     False

Why does this happen?

By the way, when you change the last statement to:
    sum(a) == sum(b)

you also get False.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof