summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-07-03 03:23:27 (GMT)
committerGitHub <noreply@github.com>2023-07-03 03:23:27 (GMT)
commit5e856049b19e2a0c78411b90a8fbc3198ca2a695 (patch)
tree72e233694ddd6b0e9ba7746c3718bd288b6334dd
parent730c873efd9aecbfa2e788faf021a3523ad6a65e (diff)
downloadcpython-5e856049b19e2a0c78411b90a8fbc3198ca2a695.zip
cpython-5e856049b19e2a0c78411b90a8fbc3198ca2a695.tar.gz
cpython-5e856049b19e2a0c78411b90a8fbc3198ca2a695.tar.bz2
[3.12] Replace the esoteric term 'datum' when describing dict comprehensions (GH-106119) (#106348)
Replace the esoteric term 'datum' when describing dict comprehensions (GH-106119) (cherry picked from commit 987b712b4aeeece336eed24fcc87a950a756c3e2) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
-rw-r--r--Doc/reference/expressions.rst22
-rw-r--r--Doc/reference/simple_stmts.rst2
2 files changed, 12 insertions, 12 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index b97a08f..08dcc80 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -298,27 +298,27 @@ Dictionary displays
.. index::
pair: dictionary; display
pair: dictionary; comprehensions
- key, datum, key/datum pair
+ key, value, key/value pair
pair: object; dictionary
single: {} (curly brackets); dictionary expression
single: : (colon); in dictionary expressions
single: , (comma); in dictionary displays
-A dictionary display is a possibly empty series of key/datum pairs enclosed in
-curly braces:
+A dictionary display is a possibly empty series of dict items (key/value pairs)
+enclosed in curly braces:
.. productionlist:: python-grammar
- dict_display: "{" [`key_datum_list` | `dict_comprehension`] "}"
- key_datum_list: `key_datum` ("," `key_datum`)* [","]
- key_datum: `expression` ":" `expression` | "**" `or_expr`
+ dict_display: "{" [`dict_item_list` | `dict_comprehension`] "}"
+ dict_item_list: `dict_item` ("," `dict_item`)* [","]
+ dict_item: `expression` ":" `expression` | "**" `or_expr`
dict_comprehension: `expression` ":" `expression` `comp_for`
A dictionary display yields a new dictionary object.
-If a comma-separated sequence of key/datum pairs is given, they are evaluated
+If a comma-separated sequence of dict items is given, they are evaluated
from left to right to define the entries of the dictionary: each key object is
-used as a key into the dictionary to store the corresponding datum. This means
-that you can specify the same key multiple times in the key/datum list, and the
+used as a key into the dictionary to store the corresponding value. This means
+that you can specify the same key multiple times in the dict item list, and the
final dictionary's value for that key will be the last one given.
.. index::
@@ -328,7 +328,7 @@ final dictionary's value for that key will be the last one given.
A double asterisk ``**`` denotes :dfn:`dictionary unpacking`.
Its operand must be a :term:`mapping`. Each mapping item is added
to the new dictionary. Later values replace values already set by
-earlier key/datum pairs and earlier dictionary unpackings.
+earlier dict items and earlier dictionary unpackings.
.. versionadded:: 3.5
Unpacking into dictionary displays, originally proposed by :pep:`448`.
@@ -344,7 +344,7 @@ in the new dictionary in the order they are produced.
Restrictions on the types of the key values are listed earlier in section
:ref:`types`. (To summarize, the key type should be :term:`hashable`, which excludes
all mutable objects.) Clashes between duplicate keys are not detected; the last
-datum (textually rightmost in the display) stored for a given key value
+value (textually rightmost in the display) stored for a given key value
prevails.
.. versionchanged:: 3.8
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index 662a4b6..a9e65be 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -210,7 +210,7 @@ Assignment of an object to a single target is recursively defined as follows.
If the primary is a mapping object (such as a dictionary), the subscript must
have a type compatible with the mapping's key type, and the mapping is then
- asked to create a key/datum pair which maps the subscript to the assigned
+ asked to create a key/value pair which maps the subscript to the assigned
object. This can either replace an existing key/value pair with the same key
value, or insert a new key/value pair (if no key with the same value existed).