Opened 7 years ago
Closed 7 years ago
#13592 closed enhancement (fixed)
padics should not be iterable
Reported by: | saraedum | Owned by: | roed |
---|---|---|---|
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 7 years ago by
comment:1 Changed 7 years ago by
- Description modified (diff)
comment:2 Changed 7 years ago by
- Status changed from new to needs_review
comment:3 Changed 7 years ago by
- Status changed from needs_review to positive_review
comment:4 Changed 7 years ago by
- Reviewers set to David Roe
comment:5 Changed 7 years ago by
- Merged in set to sage-5.5.beta0
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Seems reasonable.