From 8a950ba9e7a398e694a6c3c35103893fa6beb582 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Fri, 15 Dec 2023 23:30:03 -0500 Subject: [PATCH 1/2] gh-113046: Revise csv.reader doc Clarify nature of csvfile. --- Doc/library/csv.rst | 11 ++-- Lib/idlelib/help.html | 119 +++++++++++++++++++++++++----------------- 2 files changed, 78 insertions(+), 52 deletions(-) diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index 4d52254e6d6db5..7a5589e68b3052 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -55,10 +55,11 @@ The :mod:`csv` module defines the following functions: .. function:: reader(csvfile, dialect='excel', **fmtparams) - Return a reader object which will iterate over lines in the given *csvfile*. - *csvfile* can be any object which supports the :term:`iterator` protocol and returns a - string each time its :meth:`!__next__` method is called --- :term:`file objects - ` and list objects are both suitable. If *csvfile* is a file object, + Return a :ref:`reader object ` that will process + lines from the given *csvfile*. A csvfile must be an iterable of + strings, each in the reader's defined csv format. + A csvfile is most commonly a file-like object or list. + If *csvfile* is a file object, it should be opened with ``newline=''``. [1]_ An optional *dialect* parameter can be given which is used to define a set of parameters specific to a particular CSV dialect. It may be an instance of a subclass of @@ -449,6 +450,8 @@ Dialects support the following attributes: When ``True``, raise exception :exc:`Error` on bad CSV input. The default is ``False``. +.. _reader-objects: + Reader Objects -------------- diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index 722406b81a8ae6..1628eda2e0a8ab 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -1,33 +1,31 @@ - - + - IDLE — Python 3.12.0a0 documentation + IDLE — Python 3.13.0a2 documentation - + + - - - + - + @@ -41,35 +39,48 @@ } } - + + + +
-

Previous topic

-

tkinter.tix — Extension widgets for Tk

+

tkinter.ttk — Tk themed widgets

Next topic

@@ -1117,7 +1133,7 @@

Navigation

next |
  • - previous |
  • python logo
  • @@ -1130,7 +1146,7 @@

    Navigation

  • - 3.12.0a0 Documentation » + 3.13.0a2 Documentation »
  • @@ -1141,19 +1157,26 @@

    Navigation

    | +
  • + |
  • From 6c25867b5dff85c0b67b40eb0fc7dd2464bb674f Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sat, 16 Dec 2023 01:17:58 -0500 Subject: [PATCH 2/2] Revert .html change --- Lib/idlelib/help.html | 119 +++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 71 deletions(-) diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index 1628eda2e0a8ab..722406b81a8ae6 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -1,31 +1,33 @@ + - + - IDLE — Python 3.13.0a2 documentation + IDLE — Python 3.12.0a0 documentation - - + + + + - - + @@ -39,48 +41,35 @@ } } - - + - -
    +

    Next topic

    @@ -1133,7 +1117,7 @@

    Navigation

    next |
  • - previous |
  • python logo
  • @@ -1146,7 +1130,7 @@

    Navigation

  • - 3.13.0a2 Documentation » + 3.12.0a0 Documentation »
  • @@ -1157,26 +1141,19 @@

    Navigation

    | -
  • - |