Claudiu.Popa added the comment: Hello. Here's a basic patch with tests which accomplishes your request. Currently, it defaults to None if no item failed, but probably it can be set only when something fails the predicate (and the user will check using hasattr(t, 'last') ).
---------- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file31647/itertools_takewhile.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18821> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com