Message194380
> def coalesce(iterable, default=None, pred=None):
> return next(filter(pred, iterable), default)
>
> Are you sure you want add this one-line function to the itertools module rather then to recipes?
Well, for many ā including me ā it would mean to have this one-line function in every other project or a PyPI dependency. Iām certain there are other short but useful functions in the stdlib. |
|
Date |
User |
Action |
Args |
2013-08-04 14:23:42 | hynek | set | recipients:
+ hynek, loewis, rhettinger, mark.dickinson, ncoghlan, lukasz.langa, serhiy.storchaka |
2013-08-04 14:23:42 | hynek | link | issue18652 messages |
2013-08-04 14:23:42 | hynek | create | |
|