#13592: padics should not be iterable
--------------------------------+-------------------------------------------
Reporter: saraedum | Owner: roed
Type: enhancement | Status: new
Priority: trivial | Milestone: sage-5.5
Component: padics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Julian Rueth | Merged in:
Dependencies: | Stopgaps:
--------------------------------+-------------------------------------------
Description changed by saraedum:
Old description:
> Currently, one can iterate over a padic element. So the following code
> runs forever:
> {{{
> sage: for c in Qp(3).zero():
> ... pass
> }}}
>
> This causes some trouble, see #13302 and I think that padics should not
> return iterators at all.
>
> What should the iterator for Qp(3).zero() be — should it be infinite or
> empty? Should the iterator for Zp(3)(3) and Qp(3)(3) iterate over [0,1]
> or over [1]?
>
> I believe that if one wants to iterate over the terms, then one should
> have to call .list() or similar explicitly.
New description:
Currently, one can iterate over a padic element. So the following code
runs forever:
{{{
sage: for c in Qp(3).zero():
... pass
}}}
This causes some trouble, see #13302 and I think that padics should not
return iterators at all.
What should the iterator for Qp(3).zero() be — should it be infinite or
empty? Should the iterator for Zp(3)(3) and Qp(3)(3) iterate over
{{{[0,1]}}} or over {{{[1]}}}?
I believe that if one wants to iterate over the terms, then one should
have to call .list() or similar explicitly.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13592#comment:1>
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.