]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Clarify one-item tuple (GH-114745) (#114757)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 30 Jan 2024 18:50:28 +0000 (19:50 +0100)
committerGitHub <noreply@github.com>
Tue, 30 Jan 2024 18:50:28 +0000 (18:50 +0000)
A 'single tuple' means 'one tuple, of whatever length.
Remove the unneeded and slightly distracting parenthetical 'singleton' comment.
(cherry picked from commit a1332a99cf1eb9b879d4b1f28761b096b5749a0d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Doc/reference/expressions.rst

index 9ce2589fb3281d20227a813a510d0d44f91b07ce..8f7c014a6a4a9dc5fca6789128f67efb788b4604 100644 (file)
@@ -1883,8 +1883,9 @@ the unpacking.
 
 .. index:: pair: trailing; comma
 
-The trailing comma is required only to create a single tuple (a.k.a. a
-*singleton*); it is optional in all other cases.  A single expression without a
+A trailing comma is required only to create a one-item tuple,
+such as ``1,``; it is optional in all other cases.
+A single expression without a
 trailing comma doesn't create a tuple, but rather yields the value of that
 expression. (To create an empty tuple, use an empty pair of parentheses:
 ``()``.)