我们可以简单的将其设置为一个比较低的值,这就意味着当我们迭代该集合时,数据库将反复查询以获得数据。
We can be lazy and set this to a low value, which means that the database must be repeatedly queried to get data as we iterate over the collection.
然后,for循环反复调用这个迭代器的. next方法,直到它遇到StopIteration异常为止。
The for loop then repeatedly calls the.next method of this iterator until it encounters a StopIteration exception.
这很可能也是一个迭代过程,同样应该使用反复试验的方法。
It will likely be an iterative process as well, using the trial and error approach again.
N But it's definitely not one and in fact it wasn't N in the case of Selection Sort because remember the algorithm we implemented on stage last week had me going back and forth across the stage selecting on iteration, the smallest person I can find, the smallest number and then putting them into place.
但在选择排序中,肯定不会是1,也不是,注意,上周我们在这儿,实现的算法中,反复地,迭代进行选择,选出最小的数,然后将其放在合适的位置。
应用推荐