This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: CSV module document does not include how to append files
Type: enhancement Stage:
Components: Versions: Python 3.10
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, rhettinger, wesrl
Priority: normal Keywords:

Created on 2021-11-16 22:15 by wesrl, last changed 2022-04-11 14:59 by admin.

Messages (4)
msg406438 - (view) Author: Wesley Altham (wesrl) Date: 2021-11-16 22:15
easy- The CSV module does not include how to append a file which is using 'a' and not 'w' or 'r'. There might be more to appending but it is not documented for me to know, I saw a stackoverflow post about it when I looked and I tried it and worked. I hope whoever knows the CSV module could document append at all.
msg406440 - (view) Author: Wesley Altham (wesrl) Date: 2021-11-16 22:37
I now see other things on it but I think the doc should have it as well
msg406441 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-11-16 22:43
I don't think that is the job of CSV docs.  Appending is a general skill and not specific to that module.

Likewise, the CSV module docs don't cover other general file manipulation skills like closing, using seek() to rewind, manipulating filenames and paths, setting permissions, etc.

The csv.writer docs seem reasonable to me:

"""Return a writer object responsible for converting the user’s data into delimited strings on the given file-like object. csvfile can be any object with a write() method."""
msg406465 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-11-17 10:54
I agree with Raymond.
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 89982
2021-11-17 10:54:09eric.smithsetnosy: + eric.smith
messages: + msg406465
2021-11-16 22:43:35rhettingersetnosy: + rhettinger
messages: + msg406441
2021-11-16 22:37:55wesrlsetmessages: + msg406440
2021-11-16 22:15:53wesrlcreate