A common programming error is failure to set new values for loop variables in corner cases that are rarely used and tested.
在极少使用和测试的不重要情形中疏忽了为循环变量设置新值,这是常见的程序设计错误。
For loop conformance, consider the code snippet in Listing 3.
对于循环的一致性,可以考虑清单3中的代码片段。
The next for loop processes just the HTTP links only.
接下来将只对HTTP链接进行循环处理。
Steps [3] and [4] are repeatedly executed in a for loop.
第[3]步和[4]步可以再循环中重复执行。
We leave it as an exercise to the reader to rewrite the outermost for loop in a more elegant fashion.
我们留给读者一个练习,以更好的形式重写循环的最外层。
But from that we developed a very useful construct, which is the "for" loop.
然而由此我们发明了一个非常有用的结构,这就是“for”循环。
In some instances, the 'for' loop can be useful.
在某些场合下,'for '循环可能有用。
Now instinctively, prefer the for loop or the while loop?
现在凭感觉,你们喜欢for循环还是while循环?
Compare this with the equivalent 'for' loop.
与等价的'for '循环比较。
Most of the time, we just slap Iterator inside a for() loop or enhanced for() loop and move on, so to speak.
可以这么说,大部分时间我们只是将Iterator 随意放到for()循环或加强 for() 循环中,然后就继续其他操作了。
There's more: the for loop can be utilized to iterate over any object that supports the iteration metaphor, which makes the for loop very powerful.
还有更多信息:for循环可以用于迭代支持迭代metaphor的任何对象,这使for循环非常有用。
The for loop now iterates through the copy, while you're modifying the original list.
现在for 循环将迭代该副本,而对原始 list进行修改。
The basic syntax of a for loop is shown in Listing 1, which also demonstrates how to use continue and break statements within a for loop.
清单1中显示了for循环的基本语法,还演示了如何在for循环中使用continue和break语句。
'for '循环是个坏注意。
The for loop toward the beginning of the method makes sure of that.
指向该方法开始处的for 循环确保这一点得以实现。
The for loop essentially says "for each item element, do the following."
for循环实际是说“对每个item元素,做以下事情。”
The second for loop in this example demonstrates how to avoid this problem.
本例中的第二个for循环演示了如何避免此问题。
The for loop and sequence indexing
for 循环和序列索引
In some cases, one extra for loop means a lot of added value.
但在某些情况下,一个额外的for循环则意味着大量附加值。
You already know how to use a for loop. Now let's talk about conditionals.
您已经了解了如何使用for 循环;现在,我们来讨论条件语句。
The for loop is demonstrated in pseudocode format in Listing 10.
清单10中的伪代码格式演示了for循环。
If the dates are correct, then a For loop is executed.
如果这两个日期正确,则执行一个For循环。
You might have expected an extra for loop.
您可能已经预料到一个额外的for循环了。
The Python for loop may seem odd if you've ever used another programming language.
如果您用过其他编程语言,Pythonfor循环可能看起来有点儿古怪。
Here is an example that USES a FOR loop.
下面是一个使用FOR循环的示例。
This approach also enables the enhanced for loop to walk through the children.
这种方法还使得for循环可以遍历所有孩子。
You can easily use a for loop within bash to do the job quickly.
在bash中,可以使用for循环轻松地实现这个目标。
The main for loop iterates over every record that matched from the flat file.
主for循环将迭代每条匹配平面文件的记录。
In the case of a for loop, three additional data fields are generated.
对于for循环情况,会生成三个附加数据字段。
这是用for循环语句。
应用推荐