alimanfoo/petl — pull request #273 by rogerkwoodley (2014-07-29 01:10:39+00:00)
Title: Resolves issue #169 (https://github.com/alimanfoo/petl/issues/169)

Travis tests passed

pushheader should accept header fields as positional args

pushheader() now accepts both an explicit list of fields (e.g., pushheader(source, ['foo', 'bar']) as well as positional arguments (e.g., pushheader(source, 'foo', 'bar'))

Docstring modified to indicate how this functionality works with either a list or positional arguments passed.

The class PushHeaderView now explicitly checks to see if the first agument is a list - i.e., the existing behavior of pushheader(source, ['foo', 'bar']). If it isn't, then we assume that the user is using the positional arguments and act accordingly.

unittest added: petl.test.transform.test_headers.test_pushheader_positional()