You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If *element-key* is omitted from an *array-element-initializer*, an
3138
+
If the key is omitted from an a *yield-expression*, an
3136
3139
element key of type `int` is associated with the corresponding
3137
-
*element-value*. The key associated is one more than the previously
3140
+
value. The key associated is one more than the previously
3138
3141
assigned int key for this collection. However, if this is the first
3139
-
element in this collection with an `int` key, key zero is used. If
3140
-
*element-key* is provided, it is associated with the corresponding
3141
-
*element-value*. The resulting key/value pair is made available by
3142
-
`yield`.
3142
+
element in this collection with an `int` key, zero is used.
3143
3143
3144
-
If *array-element-initializer* is omitted, default int-key assignment is
3145
-
used and each value is `NULL`.
3144
+
If the value is also omitted, `NULL` will be used instead.
3146
3145
3147
3146
If the generator function definition declares that it returns byRef,
3148
3147
each value in a key/value pair is yielded byRef.
@@ -3151,15 +3150,15 @@ The following applies only to the `yield from` form:
3151
3150
3152
3151
A generator function (referred to as a *delegating generator*) can delegate to another generator function (referred to as a *subgenerator*), a Traversable object, or an array, each of which is designated by *expression*.
3153
3152
3154
-
Each value yielded by *expression* is passed directly to the delegating generator's caller.
3153
+
Each value yielded by *assignment-expression* is passed directly to the delegating generator's caller.
3155
3154
3156
-
Each value sent to the delegating generator's `send` method is passed to the subgenerator's `send` method. If *expression* is not a generator function, any sent values are ignored.
3155
+
Each value sent to the delegating generator's `send` method is passed to the subgenerator's `send` method. If *assignment-expression* is not a generator function, any sent values are ignored.
3157
3156
3158
-
Exceptions thrown by *expression* are propagated up to the delegating generator.
3157
+
Exceptions thrown by *assignment-expression* are propagated up to the delegating generator.
3159
3158
3160
3159
Upon traversable completion, `NULL` is returned to the delegating generator if the traversable is not a generator. If the traversable is a generator, its return value is sent to the delegating generator as the value of the `yield from`*expression*.
3161
3160
3162
-
An exception of type `Error` is thrown if *expression* evaluates to a generator that previously terminated with an uncaught exception, or it evaluates to something that is neither Traversable nor an array.
3161
+
An exception of type `Error` is thrown if *assignment-expression* evaluates to a generator that previously terminated with an uncaught exception, or it evaluates to something that is neither Traversable nor an array.
0 commit comments