#16137: lazy_list from various input data
-------------------------------------+-------------------------------------
       Reporter:  MatthieuDien       |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.0
      Component:  misc               |   Resolution:
       Keywords:  LazyPowerSeries,   |    Merged in:
  lazy_list, days57                  |    Reviewers:
        Authors:  Matthieu Dien,     |  Work issues:
  Vincent Delecroix                  |       Commit:
Report Upstream:  N/A                |  f1b8d64889eeface3f2ee18472f18a97e654ae5a
         Branch:                     |     Stopgaps:
  u/vdelecroix/16137                 |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 > 12. ticket-description "an update function": this was addressed here,
 but when I see this correctly with a different interface as in the
 original code. "a function that given a buffer..." we do not have that
 here. I am fine with it as it is, but IMHO the description of the ticket
 does not fit anymore. Should this be a separate ticket as well? Maybe also
 specifying the old branch there to not forget about it?

 Actually you could do it by inheritance and implementing `_new_slice`.
 There you have access to the cache with the method `get`. See the Thue-
 Morse example.

 I added 20 lines of code to do it from a function. There is a Thue-Morse
 bis example which uses this path. But I really find this version
 artificial. If you have an "update function" you generally need some extra
 variables that are not necesseraily easily deduced from the length of the
 list. Moreover it is very fragile (since the update function might modify
 the begining of the list without notice). What do you think? Should I
 remove it?

 > Moreover, I've did a partial cherry picking of part of the old code of
 this ticket: the two iterators are removed and a simple `yield` in
 `__iter__` now does the job. I adapted it so that it works. Please cross-
 review.

 Great! Thanks. I modified it though. Cython is somehow confused with the
 range stuff if `i` is a `Py_ssize_t`. I will investigate this and see if I
 can fix Cython.

--
Ticket URL: <http://trac.sagemath.org/ticket/16137#comment:81>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to