[issue17577] Add lookahead/peek wrapper to itertools

2016-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This doesn't seem to have gained any traction and I haven't interest in the subject for years. Marking this as closed. If the topic takes on a new life, this can be reopened and we can revisit the idea. I don't think it would be hard to patch itertools.te

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg185534 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg185533 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-31 Thread Phil Connell
Phil Connell added the comment: I like the suggested API: "iterator with indexing" is a good articulation of the request. -- ___ Python tracker ___ _

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file29615/peekiter.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file29616/peekiter.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Another possible way to go is to expand the existing tee() object to support __getitem__ and __bool__ methods. -- ___ Python tracker ___ ___

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file29615/peekiter.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Unmarking the "needs patch" stage. A rush to implementation would be premature at this point. -- stage: needs patch -> ___ Python tracker

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Based on previous discussions on the subject, I'm disinclined to accept a lookahead tool for the itertools module. Adding a recipe using tee() may be reasonable though. I'll mark this a low priority and will come back an give in more consideration at some

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-29 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue17577] Add lookahead/peek wrapper to itertools

2013-03-29 Thread Phil Connell
New submission from Phil Connell: A recipe often requested on the likes of stackoverflow and activestate is a way to look 'ahead' in an iterator, without altering the values returned for subsequent next() calls. Last time this came up on python-ideas, it got a reasonable reception: http://co