[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 a1332a99cf)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2024-01-30 19:50:28 +01:00 committed by GitHub
parent 424df31f00
commit b3d01fc56d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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:
``()``.)