[issue18652] Add itertools.first_true (return first true item in iterable)

2014-04-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3e2354dde892 by Raymond Hettinger in branch '3.4': Issue #18652: Add an itertools recipe for first_true() http://hg.python.org/cpython/rev/3e2354dde892 -- nosy: +python-dev ___ Python tracker

[issue18652] Add itertools.first_true (return first true item in iterable)

2014-04-02 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___

[issue18652] Add itertools.first_true (return first true item in iterable)

2014-04-01 Thread Joshua Bronson
Changes by Joshua Bronson jabron...@gmail.com: -- nosy: +jab ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___ Python-bugs-list mailing

[issue18652] Add itertools.first_true (return first true item in iterable)

2014-02-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: As soon as the trunk opens again, I'll add Nick's version to the itertools recipes section. I'm disinclined to add it directly to the itertools module as a native C function for several reasons: * The problem solved isn't that common (very little of

[issue18652] Add itertools.first_true (return first true item in iterable)

2014-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: David said, now I have a place in the non-test email code where using this would lead to easier-to-read code. IMO, this is telling. The bar is higher than I would have used this one time. That doesn't make it worth having to learn and remember. I will

[issue18652] Add itertools.first_true (return first true item in iterable)

2014-02-15 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___ Python-bugs-list

[issue18652] Add itertools.first_true (return first true item in iterable)

2014-02-14 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: OK, now I have a place in the non-test email code where using this would lead to easier-to-read code. Now you have not this place. ;) -- ___ Python tracker rep...@bugs.python.org

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-23 Thread Radu Voicilas
Changes by Radu Voicilas radu.voici...@gmail.com: -- nosy: +raduv ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___ Python-bugs-list

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-19 Thread R. David Murray
R. David Murray added the comment: OK, now I have a place in the non-test email code where using this would lead to easier-to-read code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-18 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Hynek, thanks for your suggestion. I would like to mull it over for a while before chiming in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-17 Thread Hynek Schlawack
Hynek Schlawack added the comment: Well that's the point: it's extremely handy but simple. I wish Raymond would pronounce on this. I can keep using the PyPI version for all I care, so I'm not going fight for it. But with one exception there seems to be an agreement that it would be a very

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-16 Thread R. David Murray
R. David Murray added the comment: For what it is worth, I am currently writing some email tests and it would certainly be convenient to have this. Of course I *can* define it locally in the the test file. -- ___ Python tracker

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Hynek Schlawack
Hynek Schlawack added the comment: So I wanted to provide a first patch to move the discussion on and realized that itertools appears currently to be completely inside of `Modules/itertoolsmodule.c`. :-/ Any volunteers? :) -- assignee: hynek - stage: - needs patch

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How large will be a C implementation of this one-line function? I'm still -1 for polluting the itertools module with trivial combinations of existing functions. -- ___ Python tracker rep...@bugs.python.org

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: How large will be a C implementation of this one-line function? I'm still -1 for polluting the itertools module with trivial combinations of existing functions. The solution is to move the current itertools to _itertools and have a companion itertools.py.

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks as too much work for too small gain (and I'm suppose the total gain is negative if we count all costs). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-10 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-05 Thread Mark Dickinson
Mark Dickinson added the comment: +1 on the name 'first_true'. Does exactly what it says on the tin. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: +1 on the name 'first_true'. Does exactly what it says on the tin. I fully agree. *** I assume what's missing now is a permission from Raymond to mess with his turf? -- ___ Python tracker rep...@bugs.python.org

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would like to chime in and say that the fact that the functions exists in SQL (and possibly Lisp, Snobol and PHP) sells me on the idea! Okay, only joking, but I do think this is a useful addition. first_true should be its name, but itertools already has a

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: (but you don't have to trust me: itertools also has izip_longest() and combinations_with_replacement()) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-04 Thread Nick Coghlan
Nick Coghlan added the comment: I concede Tim's point about itertools already using underscores where it improves readability of a name :) So, the latest state of the proposal is to add the following, preferably directly to the module, but at least as a recipe in the itertools docs: def