Skip to content

Commit 7940e32

Browse files
nedbatmiss-islington
authored andcommitted
Replace the esoteric term 'datum' when describing dict comprehensions (pythonGH-106119)
(cherry picked from commit 987b712) Co-authored-by: Ned Batchelder <[email protected]>
1 parent 730c873 commit 7940e32

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Doc/reference/expressions.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -298,27 +298,27 @@ Dictionary displays
298298
.. index::
299299
pair: dictionary; display
300300
pair: dictionary; comprehensions
301-
key, datum, key/datum pair
301+
key, value, key/value pair
302302
pair: object; dictionary
303303
single: {} (curly brackets); dictionary expression
304304
single: : (colon); in dictionary expressions
305305
single: , (comma); in dictionary displays
306306

307-
A dictionary display is a possibly empty series of key/datum pairs enclosed in
308-
curly braces:
307+
A dictionary display is a possibly empty series of dict items (key/value pairs)
308+
enclosed in curly braces:
309309

310310
.. productionlist:: python-grammar
311-
dict_display: "{" [`key_datum_list` | `dict_comprehension`] "}"
312-
key_datum_list: `key_datum` ("," `key_datum`)* [","]
313-
key_datum: `expression` ":" `expression` | "**" `or_expr`
311+
dict_display: "{" [`dict_item_list` | `dict_comprehension`] "}"
312+
dict_item_list: `dict_item` ("," `dict_item`)* [","]
313+
dict_item: `expression` ":" `expression` | "**" `or_expr`
314314
dict_comprehension: `expression` ":" `expression` `comp_for`
315315

316316
A dictionary display yields a new dictionary object.
317317

318-
If a comma-separated sequence of key/datum pairs is given, they are evaluated
318+
If a comma-separated sequence of dict items is given, they are evaluated
319319
from left to right to define the entries of the dictionary: each key object is
320-
used as a key into the dictionary to store the corresponding datum. This means
321-
that you can specify the same key multiple times in the key/datum list, and the
320+
used as a key into the dictionary to store the corresponding value. This means
321+
that you can specify the same key multiple times in the dict item list, and the
322322
final dictionary's value for that key will be the last one given.
323323

324324
.. index::
@@ -328,7 +328,7 @@ final dictionary's value for that key will be the last one given.
328328
A double asterisk ``**`` denotes :dfn:`dictionary unpacking`.
329329
Its operand must be a :term:`mapping`. Each mapping item is added
330330
to the new dictionary. Later values replace values already set by
331-
earlier key/datum pairs and earlier dictionary unpackings.
331+
earlier dict items and earlier dictionary unpackings.
332332

333333
.. versionadded:: 3.5
334334
Unpacking into dictionary displays, originally proposed by :pep:`448`.
@@ -344,7 +344,7 @@ in the new dictionary in the order they are produced.
344344
Restrictions on the types of the key values are listed earlier in section
345345
:ref:`types`. (To summarize, the key type should be :term:`hashable`, which excludes
346346
all mutable objects.) Clashes between duplicate keys are not detected; the last
347-
datum (textually rightmost in the display) stored for a given key value
347+
value (textually rightmost in the display) stored for a given key value
348348
prevails.
349349

350350
.. versionchanged:: 3.8

Doc/reference/simple_stmts.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Assignment of an object to a single target is recursively defined as follows.
210210

211211
If the primary is a mapping object (such as a dictionary), the subscript must
212212
have a type compatible with the mapping's key type, and the mapping is then
213-
asked to create a key/datum pair which maps the subscript to the assigned
213+
asked to create a key/value pair which maps the subscript to the assigned
214214
object. This can either replace an existing key/value pair with the same key
215215
value, or insert a new key/value pair (if no key with the same value existed).
216216

0 commit comments

Comments
 (0)