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

Andrew Koenig ark-mlist at att.net
Wed Jun 30 13:31:07 EDT 2004


> > Yes, I'm sure.  The proposal is that if n is an integer, iter(n) should
> > iterate over the elements of range(n).
> 
> I understood that; I don't see how you connect that with sets.Set(42).
> I don't see the word "set" anywhwere in that pep.

The connection is that sets.Set will accept an iterator as its argument, so
if integers become iterators, sets.Set(42) should work.




More information about the Python-Dev mailing list