@@ -298,27 +298,27 @@ Dictionary displays
298
298
.. index ::
299
299
pair: dictionary; display
300
300
pair: dictionary; comprehensions
301
- key, datum , key/datum pair
301
+ key, value , key/value pair
302
302
pair: object; dictionary
303
303
single: {} (curly brackets); dictionary expression
304
304
single: : (colon); in dictionary expressions
305
305
single: , (comma); in dictionary displays
306
306
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:
309
309
310
310
.. 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 `
314
314
dict_comprehension: `expression ` ":" `expression ` `comp_for `
315
315
316
316
A dictionary display yields a new dictionary object.
317
317
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
319
319
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
322
322
final dictionary's value for that key will be the last one given.
323
323
324
324
.. index ::
@@ -328,7 +328,7 @@ final dictionary's value for that key will be the last one given.
328
328
A double asterisk ``** `` denotes :dfn: `dictionary unpacking `.
329
329
Its operand must be a :term: `mapping `. Each mapping item is added
330
330
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.
332
332
333
333
.. versionadded :: 3.5
334
334
Unpacking into dictionary displays, originally proposed by :pep: `448 `.
@@ -344,7 +344,7 @@ in the new dictionary in the order they are produced.
344
344
Restrictions on the types of the key values are listed earlier in section
345
345
:ref: `types `. (To summarize, the key type should be :term: `hashable `, which excludes
346
346
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
348
348
prevails.
349
349
350
350
.. versionchanged :: 3.8
0 commit comments