Slice confusion : a[n:p] is a list exclude the last element p
claird at lairds.com
Mon Apr 28 21:07:59 CEST 2003
In article <mailman.1051548461.3290.python-list at python.org>,
andrew cooke <andrew at acooke.org> wrote:
>[1,4)+[4,7) = [1,7)
>isn't there some (fairly old) popular math book by a famousish person
>(knuth? hofstadter?) that develops maths (at least arithmetic) based on
>defining sets of points from the "number line"? i wonder what that says
>about this? (i should admit that i picked up the above from one of
>celko's db books).
Typical behavior of (modern--post-Frege, let's say) mathematicians
is to create "models". We know how arithmetic's s'posed to work,
but mathematicians delight in demonstrating that, instead of leaving
"number" as an undefinable imponderable, it can be identified with a
certain set construction. This sort of thing has been done many
times, in many books. There are correct and incorrect parts in your
memory above. "[S]ets of points from the 'number line'" will be the
hardest to unmuddle.
So: there are several relatively popular mathematically-oriented
books that illustrate, for example, Peano arithmetic.
Cameron Laird <Cameron at Lairds.com>
More information about the Python-list