why no "do : until"?

Fredrik Lundh fredrik at effbot.org
Mon Jan 8 15:45:18 EST 2001


David Morley wrote:
> What would be wrong with:
>
> class Indexing:
>     def __init__(self, thing):
>         self.thing = thing
>     def __getitem__(self, index):
>         return (index, self.thing[index])
>
> for (i,x) in Indexing(a):
>     ...

you stopped reading tim's post when you got to the
syntax proposal, right?

Cheers /F





More information about the Python-list mailing list