Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

Marko Rauhamaa marko at pacujo.net
Tue Jul 21 06:54:05 EDT 2015


Steven D'Aprano <steve+comp.lang.python at pearwood.info>:

> That's not the case. It's not so much that they stopped trying (implying 
> failure), but that they succeeded, for some definition of success (see 
> below).
>
> The contemporary standard approach is from Zermelo-Fraenkel set theory: 
> define 0 as the empty set, and the successor to n as the union of n and the 
> set containing n:
>
> 0 = {} (the empty set) 
> n + 1 = n ∪ {n}

That definition barely captures the essence of what a number *is*. In
fact, there have been different formulations of natural numbers. For
example:

   0 = {}
   1 = {0}
   2 = {1}
   3 = {2}
   etc


Marko



More information about the Python-list mailing list