#13778: lazy list
-------------------------------------+--------------------------------------
       Reporter:  vdelecroix         |         Owner:  jason           
           Type:  enhancement        |        Status:  needs_work      
       Priority:  major              |     Milestone:  sage-5.6        
      Component:  misc               |    Resolution:                  
       Keywords:  list, iterator     |   Work issues:                  
Report Upstream:  N/A                |     Reviewers:  Travis Scrimshaw
        Authors:  Vincent Delecroix  |     Merged in:                  
   Dependencies:                     |      Stopgaps:                  
-------------------------------------+--------------------------------------
Changes (by vdelecroix):

  * status:  positive_review => needs_work


Comment:

 I am sorry. Using and reusing the code I found a mistake
 {{{
 sage: from sage.misc.lazy_list import lazy_list
 sage: lazy_list([0,0]
 Traceback (most recent call last):
 ...
 IndexError: lazy list index out of range
 }}}
 The problem comes from the fact that (stop - start) // step is not the
 good formula for the length. We should take the ceil and not the floor.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13778#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to