mirror of
https://github.com/python/cpython.git
synced 2025-09-17 14:16:02 +00:00
Simplify markup.
This commit is contained in:
parent
156c31a7be
commit
456cb1e694
1 changed files with 3 additions and 6 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
.. _compound:
|
.. _compound:
|
||||||
|
|
||||||
*******************
|
*******************
|
||||||
|
@ -195,12 +194,10 @@ effect of Pascal's ``for i := a to b do``; e.g., ``range(3)`` returns the list
|
||||||
inserts an item in the sequence before the current item, the current item will
|
inserts an item in the sequence before the current item, the current item will
|
||||||
be treated again the next time through the loop. This can lead to nasty bugs
|
be treated again the next time through the loop. This can lead to nasty bugs
|
||||||
that can be avoided by making a temporary copy using a slice of the whole
|
that can be avoided by making a temporary copy using a slice of the whole
|
||||||
sequence, e.g.,
|
sequence, e.g., ::
|
||||||
|
|
||||||
::
|
for x in a[:]:
|
||||||
|
if x < 0: a.remove(x)
|
||||||
for x in a[:]:
|
|
||||||
if x < 0: a.remove(x)
|
|
||||||
|
|
||||||
|
|
||||||
.. _try:
|
.. _try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue