Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f1f0f2e

Browse filesBrowse files
[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 a1332a9) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent 679fe04 commit f1f0f2e
Copy full SHA for f1f0f2e

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎Doc/reference/expressions.rst

Copy file name to clipboardExpand all lines: Doc/reference/expressions.rst
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,8 +1873,9 @@ the unpacking.
18731873

18741874
.. index:: pair: trailing; comma
18751875

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.