[Python-Dev] Single- vs. Multi-pass iterability

Steve Holden sholden@holdenweb.com
Mon, 5 Aug 2002 07:25:49 -0400


[Oren Tirosh]
> On Sun, Aug 04, 2002 at 04:07:08PM -0500, Patrick K. O'Brien wrote:
> > [Guido van Rossum]
> > >
> > > - There really isn't anything "broken" about the current situation;
> > >   it's just that "next" is the only method name mapped to a slot in
> > >   the type object that doesn't have leading and trailing double
> > >   underscores.
> >
But would you define it as __next__() if you had to do it again? A
__next__()/next() relationship does seem to fit more neatly.

> > I'm way behind on the email for this list, but I wanted to chime in with
an
> > idea related to this old thread. I know we want to limit the rate of
> > language/feature changes for the business community. At the same time,
this
> > situation with iterators is proof that even the best thought out new
> > features can still have a few blemishes that get discovered after
they've
> > been incorporated into Python proper.
>
> I think I have a reasonable solution for the re-iteration blemish in the
> iteration protcol without breaking backward compatibility:
>
> http://mail.python.org/pipermail/python-dev/2002-July/026960.html
>

> > So perhaps we need some sort of concept of a "grace period" on brand-new
> > features during which blemishes can be polished off, even if the
polishing
> > breaks backward compatibility. After the grace period, breaking backward
> > compatibility becomes a higher priority.
>
> Giving more people a chance to play with new features before they are
> finalized is a very good idea. When a significant new feature is checked
in
> to the CVS a preview version can be released in source and precompiled
form
> to encourage more people to test it. Most CVS snapshots seem stable enough
> for a programmer's daily use.
>
Given the general lack of alpha- and beta-testing there'd be very little
feedback. I seem to remember that the CVS snapshots went missing in action
recently without anyone noticing, which shows that they aren't much used,
and I guess the same would be true of preview versions. Tracking the CVS
repository will test such features, but getting more testing than that would
be difficult.

I *do* agree that such feature testing would be inestimably useful.

> A good example of such a significant new feature is the source encoding
> just checked in.
>
Indeed.

regards
-----------------------------------------------------------------------
Steve Holden                                 http://www.holdenweb.com/
Python Web Programming                http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------