Remove discussion of loop variables in the form x[a] or x.a.
Deprecation of that form is a subject encompassing all for-loop constructs and is not specific to this PEP. Also, most people are not aware that those forms are even possible, so it is prudent to not even bring it up as that would inevitably increase the number of people trying it in their code.
This commit is contained in:
parent
326a56a0f3
commit
851181bca6
|
@ -152,9 +152,6 @@ semantic and syntactic specification.)
|
||||||
y = list(x for x in "abc")
|
y = list(x for x in "abc")
|
||||||
print x # prints "hello", not "c"
|
print x # prints "hello", not "c"
|
||||||
|
|
||||||
(Loop variables may also use constructs like x[i] or x.a; this form
|
|
||||||
may be deprecated.)
|
|
||||||
|
|
||||||
4. All free variable bindings are captured at the time this function
|
4. All free variable bindings are captured at the time this function
|
||||||
is defined, and passed into it using default argument values. For
|
is defined, and passed into it using default argument values. For
|
||||||
example::
|
example::
|
||||||
|
|
Loading…
Reference in New Issue