Author ncoghlan
Recipients hynek, loewis, lukasz.langa, mark.dickinson, ncoghlan, r.david.murray, rhettinger, serhiy.storchaka, tim.peters
Date 2013-08-05.00:04:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375661085.94.0.825989015274.issue18652@psf.upfronthosting.co.za>
In-reply-to
Content
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 first_true(iterable, default=None, pred=None):
        """Returns the first true item in the iterable

        If no such item is found, returns *default*
        If *pred* is not None, returns the first item
        for which pred(item) is true.
        """
        return next(filter(pred, iterable), default)
History
Date User Action Args
2013-08-05 00:04:45ncoghlansetrecipients: + ncoghlan, tim.peters, loewis, rhettinger, mark.dickinson, r.david.murray, lukasz.langa, hynek, serhiy.storchaka
2013-08-05 00:04:45ncoghlansetmessageid: <1375661085.94.0.825989015274.issue18652@psf.upfronthosting.co.za>
2013-08-05 00:04:45ncoghlanlinkissue18652 messages
2013-08-05 00:04:45ncoghlancreate