From fad74c8d68572d0c23ee922e1d6132b6e6e0fe94 Mon Sep 17 00:00:00 2001 From: Will Flowers Date: Sat, 7 Jun 2025 23:23:57 -0400 Subject: [PATCH 1/3] docs: update CSV page to improve readability and language (pythonGH-135243) --- Doc/library/csv.rst | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index 5297be17bd708e..9b948ab1966b0f 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -14,23 +14,25 @@ -------------- -The so-called CSV (Comma Separated Values) format is the most common import and -export format for spreadsheets and databases. CSV format was used for many -years prior to attempts to describe the format in a standardized way in -:rfc:`4180`. The lack of a well-defined standard means that subtle differences -often exist in the data produced and consumed by different applications. These -differences can make it annoying to process CSV files from multiple sources. -Still, while the delimiters and quoting characters vary, the overall format is -similar enough that it is possible to write a single module which can -efficiently manipulate such data, hiding the details of reading and writing the -data from the programmer. +The Comma Separated Values (CSV) format is the most common import and +export format for spreadsheets and databases. The basic format is columns +of text data separated by a comma delimiter. The standards for CSV data are +defined in :rfc:`4180`. + +The CSV format was used for many years before the standards were defined, and +adherence to the standards is inconsistent. As a result, there can be variations +in the delimiters and quoting characters in the CSV data that is produced and +consumed by different applications. These differences can make it troublesome to +process CSV files from multiple sources. However, the basic format is standard enough +that a single module can efficiently manipulate this data and enable the programmer to +read and write files without having to account for inconsistencies. The :mod:`csv` module implements classes to read and write tabular data in CSV -format. It allows programmers to say, "write this data in the format preferred -by Excel," or "read data from this file which was generated by Excel," without -knowing the precise details of the CSV format used by Excel. Programmers can -also describe the CSV formats understood by other applications or define their -own special-purpose CSV formats. +format. For example, the module enables programmers to say, "write this data in the +format preferred by Excel," or "read data from this file which was generated by Excel," +without knowing the precise details of the CSV format that is used by Excel. Programmers +can also describe CSV formats that are used by other applications or define custom CSV +formats for specific use cases. The :mod:`csv` module's :class:`reader` and :class:`writer` objects read and write sequences. Programmers can also read and write data in dictionary form From 89105b660347b7832ed68aeb2270a07feadec070 Mon Sep 17 00:00:00 2001 From: Will Flowers Date: Sun, 8 Jun 2025 01:23:26 -0400 Subject: [PATCH 2/3] doc: remove trailing space --- Doc/library/csv.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index 9b948ab1966b0f..527f2a36e04ed7 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -28,7 +28,7 @@ that a single module can efficiently manipulate this data and enable the program read and write files without having to account for inconsistencies. The :mod:`csv` module implements classes to read and write tabular data in CSV -format. For example, the module enables programmers to say, "write this data in the +format. For example, the module enables programmers to say, "write this data in the format preferred by Excel," or "read data from this file which was generated by Excel," without knowing the precise details of the CSV format that is used by Excel. Programmers can also describe CSV formats that are used by other applications or define custom CSV From 16f6d47a59405cde14582454139b69a0d80c2fdf Mon Sep 17 00:00:00 2001 From: Will Flowers Date: Sun, 8 Jun 2025 15:40:09 -0400 Subject: [PATCH 3/3] GH-135243: change use to understand --- Doc/library/csv.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index 527f2a36e04ed7..23104852952e86 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -30,9 +30,9 @@ read and write files without having to account for inconsistencies. The :mod:`csv` module implements classes to read and write tabular data in CSV format. For example, the module enables programmers to say, "write this data in the format preferred by Excel," or "read data from this file which was generated by Excel," -without knowing the precise details of the CSV format that is used by Excel. Programmers -can also describe CSV formats that are used by other applications or define custom CSV -formats for specific use cases. +without knowing the precise details of the CSV format that is understood by Excel. +Programmers can also describe CSV formats that are understood by other applications or +define custom dialects (CSV formats) for specific use cases. The :mod:`csv` module's :class:`reader` and :class:`writer` objects read and write sequences. Programmers can also read and write data in dictionary form