diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-01-30 18:50:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 18:50:32 (GMT) |
commit | f1f0f2e3d740c96edd233f4f1a1aa76cdc81bb53 (patch) | |
tree | 3a528c770cc4052c4f6e9a516adc53686d92c36f /Doc | |
parent | 679fe04dc3a11148c32383eed60954e35699ad62 (diff) | |
download | cpython-f1f0f2e3d740c96edd233f4f1a1aa76cdc81bb53.zip cpython-f1f0f2e3d740c96edd233f4f1a1aa76cdc81bb53.tar.gz cpython-f1f0f2e3d740c96edd233f4f1a1aa76cdc81bb53.tar.bz2 |
[3.11] Clarify one-item tuple (GH-114745) (#114758)
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 1fec404..2f346fb 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -1873,8 +1873,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: ``()``.) |