#10743: Add iterator protocol to EclObject
-----------------------------------+----------------------------------------
Reporter: nbruin | Owner: nbruin
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: interfaces | Keywords: ECL lisp ecllib
Author: Nils Bruin | Upstream: N/A
Reviewer: Karl-Dieter Crisman | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
Changes (by kcrisman):
* reviewer: => Karl-Dieter Crisman
Comment:
Somewhat surprisingly, I could understand all of this code, and it makes
perfect sense. Tests work out fine, obviously, though I don't know if any
edge cases have been tried, since I am not sure what the edge cases would
be. My guess is that this is used fairly heavily in #7377, is that
correct?
My only request is that there might be a doctest to show the list and
tuples working directly, like so:
{{{
sage: [i for i in EclObject([1,2,3])]
[<ECL: 1>, <ECL: 2>, <ECL: 3>]
sage: [i for i in EclObject((1,2,3))]
[<ECL: 1>, <ECL: 2>, <ECL: 3>]
}}}
I realize that combining the doctests from !EclObject and this module
amount to the same thing, but it would be very helpful for someone wanting
to understand the Ecl interface better.
I'm going to attach a reviewer patch for this, with the understanding that
if for some reason this causes #7377 patches to not apply correctly, the
positive review for the current patch would remain (and I'd open a
separate ticket for this).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10743#comment:9>
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.