diff -r d7c31c73b1bd Doc/library/csv.rst --- a/Doc/library/csv.rst Sun Sep 04 12:31:47 2016 +0100 +++ b/Doc/library/csv.rst Sun Sep 04 22:18:24 2016 +0530 @@ -464,7 +464,8 @@ .. method:: DictWriter.writeheader() - Write a row with the field names (as specified in the constructor). + Write a row with the field names (as specified in the constructor) to + the writer's file object, formatted according to the current dialect. .. versionadded:: 3.2 diff -r d7c31c73b1bd Lib/csv.py --- a/Lib/csv.py Sun Sep 04 12:31:47 2016 +0100 +++ b/Lib/csv.py Sun Sep 04 22:18:24 2016 +0530 @@ -141,7 +141,7 @@ def writeheader(self): header = dict(zip(self.fieldnames, self.fieldnames)) - self.writerow(header) + return self.writerow(header) def _dict_to_list(self, rowdict): if self.extrasaction == "raise":