-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
py/mpconfig: Enable 2-argument built-in next() at basic feature level. #16902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
py/mpconfig: Enable 2-argument built-in next() at basic feature level. #16902
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #16902 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 169 169
Lines 21877 21877
=======================================
Hits 21558 21558
Misses 319 319 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
All reactions
Sorry, something went wrong.
Code size report:
|
All reactions
Sorry, something went wrong.
Change LGTM but we should probably update or remove |
All reactions
Sorry, something went wrong.
a3fd78e
to
48a87f7
Compare
Good idea, now removed. I think in general the policy is that we only document differences that are different no matter what the configuration level. |
All reactions
-
👍 1 reaction
Sorry, something went wrong.
This is a pretty fundamental built-in and having CPython-compatible behaviour is beneficial. The code size increase is not much, and ports/boards can still disable it if needed to save space. Addresses issue micropython#5384. Signed-off-by: Damien George <damien@micropython.org>
Because 2-arg `next()` is implemented, and now enabled at the basic feature level. Signed-off-by: Damien George <damien@micropython.org>
48a87f7
to
994751c
Compare
Successfully merging this pull request may close these issues.
Summary
Enable the 2-argument form of the built-in
next()
function at the basic feature level (which is one above core features).This is a pretty fundamental built-in and having CPython-compatible behaviour is beneficial. The code size increase is not much, and ports/boards can still disable it if needed to save space.
Addresses issue #5384.
Testing
CI should test this.
Trade-offs and Alternatives
Could leave it disabled and document better the differences. But I think it's worth the increase in code size, most big boards have enough space.