[issue38200] Adding itertools.pairwise to the standard library?

2020-11-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38200] Adding itertools.pairwise to the standard library?

2020-11-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset cc061d0e6fb2569efa91531686f75b89e94ec865 by Raymond Hettinger in branch 'master': bpo-38200: Add itertools.pairwise() (GH-23549) https://github.com/python/cpython/commit/cc061d0e6fb2569efa91531686f75b89e94ec865 --

[issue38200] Adding itertools.pairwise to the standard library?

2020-11-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +22429 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23549 ___ Python tracker

[issue38200] Adding itertools.pairwise to the standard library?

2020-11-28 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file49633/pairwise.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38200] Adding itertools.pairwise to the standard library?

2019-11-30 Thread bbayles
Change by bbayles : -- nosy: +bbayles ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38200] Adding itertools.pairwise to the standard library?

2019-10-01 Thread Matteo Dell'Amico
Matteo Dell'Amico added the comment: Sorry for taking so long to answer, I didn't see notifications somehow. Raymond, my use case is in general something that happens when I'm doing analytics on sequences of events (e.g., URLs visited by a browser) or paths in a graph. I look at pairs and

[issue38200] Adding itertools.pairwise to the standard library?

2019-09-18 Thread Tim Peters
Tim Peters added the comment: There's an eternal culture clash here: functional languages have a long history of building in just about everything of plausible use, regardless of how trivial to build on other stuff. This started when LISP was barely released before (cadr x) was introduced

[issue38200] Adding itertools.pairwise to the standard library?

2019-09-18 Thread Vedran Čačić
Vedran Čačić added the comment: I also use it all the time. Most recently in some numerical calculation for successive differences. My main problem is that I'm too often tempted to just zip l with l[1:], thereby restricting the code to sequences, when it would work perfectly well for any

[issue38200] Adding itertools.pairwise to the standard library?

2019-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, pairwise() is in the more-itertools module. A quick code search does show occasional use in the wild: https://github.com/search?q=language%3Apython+more_itertools.pairwise=Code In my own code, I've had some cases that almost fit but they

[issue38200] Adding itertools.pairwise to the standard library?

2019-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can you show some examples of what you used it for? -- assignee: -> rhettinger ___ Python tracker ___

[issue38200] Adding itertools.pairwise to the standard library?

2019-09-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger type: -> enhancement versions: +Python 3.9 ___ Python tracker ___ ___

[issue38200] Adding itertools.pairwise to the standard library?

2019-09-17 Thread Matteo Dell'Amico
New submission from Matteo Dell'Amico : I use itertools.pairwise all the time and I wonder if the same happens to others. I'm thinking that others may be in the same situation, and having this simple recipe already included in the library would be definitely more convenient than copy/pasting