Opened 3 years ago

Closed 3 years ago

#28178 closed defect (fixed)

get rid of ETupleIter

Reported by: Vincent Delecroix Owned by:
Priority: major Milestone: sage-8.9
Component: algebra Keywords:
Cc: Merged in:
Authors: Vincent Delecroix Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 273cf12 (Commits, GitHub, GitLab) Commit: 273cf129af58929570cf20d641611c3a4d85892d
Dependencies: Stopgaps:

Status badges

Description (last modified by Vincent Delecroix)

ETuple used in exponents of generic multivariate polynomials implement their own iterator ETupleIter which is broken with respect to

sage: from array import array
sage: R.<x,y,z> = QQ[]
sage: e = (x*y*z).exponents()[0]
sage: array('l', e)
Traceback (most recent call last):
...
TypeError: 'sage.rings.polynomial.polydict.ETupleIter' object is not iterable

Now that Cython is more modern than at the time this was implemented we get rid of this custom iterator.

Change History (7)

comment:1 Changed 3 years ago by Vincent Delecroix

Authors: Vincent Delecroix
Branch: u/vdelecroix/28178
Description: modified (diff)
Status: newneeds_review
Summary: implement __iter__ for ETupleIterget rid of ETupleIter

comment:2 Changed 3 years ago by git

Commit: d1e48b3bb0ad6682e5afc59e109b2e205c2f5b45

Branch pushed to git repo; I updated commit sha1. New commits:

d1e48b328178: get rid of ETupleIter

comment:3 Changed 3 years ago by Frédéric Chapoton

Status: needs_reviewneeds_work

2 failing doctests, see patchbot report

comment:4 Changed 3 years ago by git

Commit: d1e48b3bb0ad6682e5afc59e109b2e205c2f5b45273cf129af58929570cf20d641611c3a4d85892d

Branch pushed to git repo; I updated commit sha1. New commits:

273cf1228178: fix length 1 ETuple string

comment:5 Changed 3 years ago by Vincent Delecroix

Status: needs_workneeds_review

Indeed.

comment:6 Changed 3 years ago by Frédéric Chapoton

Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

ok, lgtm

comment:7 Changed 3 years ago by Volker Braun

Branch: u/vdelecroix/28178273cf129af58929570cf20d641611c3a4d85892d
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.