Skip to content

Commit 81e86b3

Browse files
committed
rearrange dict comprehension reference into a bulleted list
1 parent fa16f82 commit 81e86b3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Doc/reference/expressions.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -425,15 +425,15 @@ earlier dict items and earlier dictionary unpackings.
425425

426426
A dict comprehension may take one of two forms:
427427

428-
The first form uses two expressions separated with a colon followed by the
429-
usual "for" and "if" clauses. When the comprehension is run, the resulting key
430-
and value elements are inserted in the new dictionary in the order they are
431-
produced.
432-
433-
The second form uses a single expression prefixed by the ``**`` dictionary
434-
unpacking operator followed by the usual "for" and "if" clauses. When the
435-
comprehension is run, the expression is evaluated and then unpacked, inserting
436-
zero or more key/value pairs into the new dictionary.
428+
- The first form uses two expressions separated with a colon followed by the
429+
usual "for" and "if" clauses. When the comprehension is run, the resulting
430+
key and value elements are inserted in the new dictionary in the order they
431+
are produced.
432+
433+
- The second form uses a single expression prefixed by the ``**`` dictionary
434+
unpacking operator followed by the usual "for" and "if" clauses. When the
435+
comprehension is evaluated, the expression is evaluated and then unpacked,
436+
inserting zero or more key/value pairs into the new dictionary.
437437

438438
Both forms of dictionary comprehension retain the property that if the same key
439439
is specified multiple times, the associated value in the resulting dictionary

0 commit comments

Comments
 (0)