diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-01-30 18:50:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 18:50:28 (GMT) |
commit | b3d01fc56d745d895d40e6c57f4bb8eee14c7047 (patch) | |
tree | e4358d36ac71802e3933e5821d7f3c115e17dd71 /Doc | |
parent | 424df31f00e2106eab6b8e747fc4695b00787fe5 (diff) | |
download | cpython-b3d01fc56d745d895d40e6c57f4bb8eee14c7047.zip cpython-b3d01fc56d745d895d40e6c57f4bb8eee14c7047.tar.gz cpython-b3d01fc56d745d895d40e6c57f4bb8eee14c7047.tar.bz2 |
[3.12] Clarify one-item tuple (GH-114745) (#114757)
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>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/reference/expressions.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 9ce2589..8f7c014 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -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: ``()``.) |