Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fit start on iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Jan 17, 2016
1 parent fb86dbf commit 1136a64
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/sage/misc/lazy_list.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -796,9 +796,16 @@ cdef class lazy_list_generic(object):
start 0
stop 5
step 1
::
sage: tuple(lazy_list(Primes()).dropwhile(lambda x: x < 10)[:5])
(11, 13, 17, 19, 23)
"""
cdef Py_ssize_t i

if self._fit(self.start):
return
i = self.start
while i < self.stop:
if self._fit(i):
Expand Down

0 comments on commit 1136a64

Please sign in to comment.