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 a1332a9

Browse filesBrowse files
authored
Clarify one-item tuple (#114745)
A 'single tuple' means 'one typle, of whatever length. Remove the unneeded and slight distracting parenthetical 'singleton' comment.
1 parent 0990d55 commit a1332a9
Copy full SHA for a1332a9

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
@@ -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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.