#17398 closed enhancement (fixed)
Changing .next() to next(...)
Reported by: | aapitzsch | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.5 |
Component: | misc | Keywords: | python3 |
Cc: | Merged in: | ||
Authors: | André Apitzsch | Reviewers: | Marc Mezzarobba |
Report Upstream: | N/A | Work issues: | |
Branch: | f505b87 (Commits, GitHub, GitLab) | Commit: | |
Dependencies: | #17460 | Stopgaps: |
Description
The next()
method is gone in Python 3 and replaced by the next(...)
function[1], which is also available in Python 2 [0].
This is part of #16075.
[0] https://docs.python.org/2/library/functions.html#next [1] https://docs.python.org/3/library/functions.html#next
Change History (12)
comment:1 Changed 8 years ago by
Branch: | → u/aapitzsch/ticket/17398 |
---|---|
Commit: | → 5e09bde1b91d4638392ee93592f4d71c2ad59b35 |
Status: | new → needs_review |
comment:2 Changed 8 years ago by
Commit: | 5e09bde1b91d4638392ee93592f4d71c2ad59b35 → a402461642307b7025649375984baa0216f8aae1 |
---|
comment:3 Changed 8 years ago by
Status: | needs_review → needs_work |
---|---|
Work issues: | → merge conflicts |
comment:4 Changed 8 years ago by
Commit: | a402461642307b7025649375984baa0216f8aae1 → 0372ae84cf56d82aac3a18302de872b24bce3329 |
---|
comment:5 Changed 8 years ago by
Status: | needs_work → needs_review |
---|---|
Work issues: | merge conflicts |
comment:6 follow-up: 8 Changed 8 years ago by
Dependencies: | → #17460 |
---|---|
Status: | needs_review → needs_work |
This likely conflicts with #17460, can you rebase on top of that please?
comment:7 Changed 8 years ago by
Commit: | 0372ae84cf56d82aac3a18302de872b24bce3329 → f505b87b4c15c07ca251f9692f4da41a8a025ab6 |
---|
comment:8 Changed 8 years ago by
Status: | needs_work → needs_review |
---|
comment:9 Changed 8 years ago by
Reviewers: | → Marc Mezzarobba |
---|---|
Status: | needs_review → positive_review |
(Tested with many of the positively reviewed search-and-replace tickets, but perhaps not all.)
comment:10 Changed 8 years ago by
Branch: | u/aapitzsch/ticket/17398 → f505b87b4c15c07ca251f9692f4da41a8a025ab6 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
comment:11 follow-up: 12 Changed 8 years ago by
Commit: | f505b87b4c15c07ca251f9692f4da41a8a025ab6 |
---|
It is normal that, on develop.6.8.beta1
i got at least 262 calls to the .next()
method ?
$ grep -R '\.next(' | wc -l 262
comment:12 Changed 8 years ago by
Replying to tmonteil:
It is normal that, on
develop.6.8.beta1
i got at least 262 calls to the.next()
method ?$ grep -R '\.next(' | wc -l 262
Not all of the .next()
method calls can be converted to next(...)
function, because the related object is no iterator.
I opened #18592 to convert some of the methods.
Branch pushed to git repo; I updated commit sha1. New commits:
Merge remote-tracking branch 'origin/develop' into py3_next