Opened 10 years ago
Closed 10 years ago
#13592 closed enhancement (fixed)
padics should not be iterable
Reported by: | Julian Rüth | Owned by: | David Roe |
---|---|---|---|
Priority: | trivial | Milestone: | sage-5.5 |
Component: | padics | Keywords: | |
Cc: | Merged in: | sage-5.5.beta0 | |
Authors: | Julian Rueth | Reviewers: | David Roe |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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.
Attachments (1)
Change History (6)
Changed 10 years ago by
Attachment: | trac_13592.patch added |
---|
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 10 years ago by
Status: | new → needs_review |
---|
comment:3 Changed 10 years ago by
Status: | needs_review → positive_review |
---|
comment:4 Changed 10 years ago by
Reviewers: | → David Roe |
---|
comment:5 Changed 10 years ago by
Merged in: | → sage-5.5.beta0 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
Seems reasonable.