jdunck/python-unicodecsv — pull request #29 by tsroten (2014-03-10 13:05:19+00:00)
Title: Fixes typo in DictWriter.writeheader

This is the current code for ``DictWriter.writeheader()``:

```python
def writeheader(self):
fieldnames = _stringify_list(self.fieldnames, self.encoding, self.encoding_errors)
header = dict(zip(self.fieldnames, self.fieldnames))
self.writerow(header)
```

As you can see, when ``zip()`` is called, both arguments are the same (like in the standard library version). In the previous line ``fieldnames`` is defined, but it's never used. I assume this is a typo and that line 2 of the function should be this: ``header = dict(zip(self.fieldnames, fieldnames))``. This pull request fixes that typo.