A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-April/044171.html below:

[Python-Dev] Re: Proposed iterator representations

[Python-Dev] Re: Proposed iterator representationsTerry Reedy tjreedy at udel.edu
Fri Apr 9 14:23:15 EDT 2004
"Raymond Hettinger" <python at rcn.com> wrote in message
news:000b01c41ddb$94296280$0507a044 at oemcomputer...
> I checked in two itertool representations that were clear-cut:

;-)

> >>> from itertools import count, repeat
> >>> count(20)
> count(20)

Is the representation (of the dynamic object) static?  Does

it=count(20); it.next(), it.next(); it

still print 'count(20)' as it one was but no longer is?

This seems much like lt=iter([1,2,3]); lt.next(); lt.next(); lt printing
iter([1,2,3]) instead of iter([3]), or worse, lt=[1,2,3]; lt.pop();
lt.pop(); lt printing [1,2,3] instead of [1].

Terry J. Reedy




More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4