@@ -131,7 +131,7 @@ Specification
131131Syntax
132132------
133133
134- The necessary grammatical changes are allowing the expression in list/set
134+ The grammar should be changed to allow the expression in list/set
135135comprehensions and generator expressions to be preceded by a ``* ``, and
136136allowing an alternative form of dictionary comprehension in which a
137137double-starred expression can be used in place of a ``key: value `` pair.
@@ -217,7 +217,7 @@ Semantics: Generator Expressions
217217Generator expressions using the unpacking syntax should form new generators
218218producing values from the concatenation of the iterables given by the
219219expressions. Specifically, the behavior is defined to be equivalent to the
220- following (though without defining for referencing the looping variable
220+ following (though without defining or referencing the looping variable
221221``i ``)::
222222
223223 # equivalent to generator = (*expr for x in it)
@@ -655,7 +655,7 @@ resulting generator, but several alternatives were suggested in our discussion
655655 other aspects of this proposal are accepted.
656656
657657The reason to prefer this proposal over these alternatives is the preservation
658- of existent conventions for punctuation around generator expressions.
658+ of existing conventions for punctuation around generator expressions.
659659Currently, the general rule is that generator expressions must be wrapped in
660660parentheses except when provided as the sole argument to a function, and this
661661proposal suggests maintaining that rule even as we allow more kinds of
@@ -794,7 +794,7 @@ were raised as well. This section aims to summarize those concerns.
794794 Complex uses of unpacking in comprehensions could obscure logic that would be
795795 clearer in an explicit loop. While this is already a concern with
796796 comprehensions more generally, the addition of ``* `` and ``** `` may make
797- particularly- complex uses even more difficult to read and understand at a
797+ particularly complex uses even more difficult to read and understand at a
798798 glance. For example, while these situations are likely rare, comprehensions
799799 that use unpacking in multiple ways can make it difficult to know what's
800800 being unpacked and when: ``f(*(*x for *x, _ in list_of_lists)) ``.
@@ -840,7 +840,7 @@ Many languages that support comprehensions support double loops:
840840 (for [xs [[1 2 3] [] [4 5]] x (concat xs xs)] x)
841841
842842 Several other languages (even those without comprehensions) support these
843- operations via a built-in function/ method to support flattening of nested
843+ operations via a built-in function or method to support flattening of nested
844844structures:
845845
846846.. code :: python
@@ -850,7 +850,7 @@ structures:
850850
851851 .. code :: javascript
852852
853- // Javascript
853+ // JavaScript
854854 [[1 ,2 ,3 ], [], [4 ,5 ]].flatMap (xs => [... xs, ... xs])
855855
856856 .. code :: haskell
@@ -873,7 +873,7 @@ in Julia currently leads to a syntax error:
873873
874874 As one counterexample, support for a similar syntax was recently added to `Civet
875875<https://civet.dev/> `_. For example, the following is a valid comprehension in
876- Civet, making use of Javascript 's ``... `` syntax for unpacking:
876+ Civet, making use of JavaScript 's ``... `` syntax for unpacking:
877877
878878.. code :: javascript
879879
0 commit comments