[Python-Dev] Re: PEP 276 (simple iterator for ints)

David Abrahams dave at boost-consulting.com
Wed Jun 30 12:23:42 EDT 2004


"Andrew Koenig" <ark at acm.org> writes:

> I happened to look at PEP 276 and was struck by the thought that PEP 276 is
> really an implementation of the well-known set-theoretic construction of the
> natural numbers that defines each natural number as the set of all smaller
> ones.  In other words, it defines 0 as the empty set, 1 as the set whose
> only element is 0, 2 as the set whose elements are 0 and 1, and so on.
>
> Indeed, under PEP 276, sets.Set(42) would be a set with 42 elements that
> would be exactly the canonical representation of 42.

?? Simple Iterator For Ints ?? 
http://www.python.org/peps/pep-0276.html
Are you sure you mean 276?

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com




More information about the Python-Dev mailing list