[Python-Dev] PEP 201 - Parallel iteration
Wed, 19 Jul 2000 21:17:37 +0200
On Wed, Jul 19, 2000 at 02:48:20PM -0400, Barry A. Warsaw wrote:
> >>>>> "KY" == Ka-Ping Yee <email@example.com> writes:
> KY> (Ideally range(), zip(), and irange() would all make
> KY> generators one day, and xrange() could be deprecated.)
> I agree! So maybe what we need is a general generator type written in
> C. Could the xrange type be subverted to this purpose?
Not likely. You'd have to write the assignment functions (changing the object
into a list-type if that is done) and most of the other stuff has to be
rewritten: almost all of xrange() is specific for PyInt's. It stores step,
start, end and repeater (for 'xrange * 10') as longs, and calculates return
values for getitem and repr and the like from those.
Other than a standard object boilerplate, it's pretty useless for more
Thomas Wouters <firstname.lastname@example.org>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!