Skip to content

Commit 2690a1a

Browse files
terryjreedyaisk
authored andcommitted
Clarify one-item tuple (python#114745)
A 'single tuple' means 'one typle, of whatever length. Remove the unneeded and slight distracting parenthetical 'singleton' comment.
1 parent 8a0a33b commit 2690a1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/reference/expressions.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -1890,8 +1890,9 @@ the unpacking.
18901890

18911891
.. index:: pair: trailing; comma
18921892

1893-
The trailing comma is required only to create a single tuple (a.k.a. a
1894-
*singleton*); it is optional in all other cases. A single expression without a
1893+
A trailing comma is required only to create a one-item tuple,
1894+
such as ``1,``; it is optional in all other cases.
1895+
A single expression without a
18951896
trailing comma doesn't create a tuple, but rather yields the value of that
18961897
expression. (To create an empty tuple, use an empty pair of parentheses:
18971898
``()``.)

0 commit comments

Comments
 (0)