#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 | 80aad4d9dbc02333435477173ad98871d40625b8
Branch: u/dkrenn/16137 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by dkrenn):
> > 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?
Since it is already there now, I would keep it. However, I won't need this
feature (at this point), so I don't mind if it is removed.
> > 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.
Ok, thank you.
15. `lazy_list_abstract` vs. for example `lazy_list_generic`: I find it a
bit strange to instantiate something with "abstract" in its name.
16. `beginning` vs. `inital_values`: I have a slight (but not strong)
preference for the latter.
I've also made some minor changes; please cross-review.
--
Ticket URL: <http://trac.sagemath.org/ticket/16137#comment:87>
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.