#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):
Hola Daniel,
Thanks!
Replying to [comment:72 dkrenn]:
> I made a couple of smaller/minor changes during review; need cross-
review. Additionally the following should be addressed/discussed:
>
> 1. `_new_slice` and other private methods: `_new_slice_` (underscore at
the end as well)?
I really don't care. But I do not see why it should be with 2 underscores.
For me the double underscore methods are saying "I want to interact with
the rest of Sage and cares about coercions". Like `_add_`, `_cmp_` etc.
But it might be a personal feeling.
> 2. description, INPUT/OUTPUT of `lazy_list` is missing
done.
> 3. should `list(cache)` appear in the code so that the cache cannot be
changed 8accidentally) from outside since only a reference of the list is
passed? This would also allow e.g. tuples as well. Or is it meant that
`cache` really specifies the cache itself and not only the cached
elements. If so, can we make this clear in the doc somewhere (description
of `lazy_list`)?
This is a feature you might actually want to use. In the constructors
`__init__` method we clearly want to use the reference to the same list (I
made it clear in the doc). In the factory `lazy_list` I am in favour of
copying and adapted the code accordingly.
> 4. `_fit`, last example: looks incomplete
Actually not... I had some non trivial error. This method is subtle as for
finite `lazy_list` you want to avoid the `StopIteration`branch. Though I
added a `_info()`.
> 5. `__call__`: write oneline description
done
--
Ticket URL: <http://trac.sagemath.org/ticket/16137#comment:79>
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.