alimanfoo/petl — pull request #274 by rogerkwoodley (2014-07-29 02:48:38+00:00)
Title: Resolves issue #179 (https://github.com/alimanfoo/petl/issues/179): sear...

...ch complement

searchcomplement() function has been added. For code reusability and to implicitly ensure that the function is the complement of search, the implementation is wrapper of search(), and search() has been extended to allow for complement behavior.

search() (and related views and iterator functions) now includes a 'complement_flag' boolean (default=False). This yields the existing functionality (confirmed with existing unittests).

When complement_flag=True, the iterator function now yields rows that fail the test() lambda function

Docstring modified to describe functionality, mirroring the docstring for search()

unittest added: petl.test.transform.text_regex.test_searchcomplement()