Skip to content
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

gh-90716: bugfixes and more tests for _pylong. #99073

Merged
merged 3 commits into from
Nov 3, 2022

Conversation

gpshead
Copy link
Member

@gpshead gpshead commented Nov 3, 2022

  • Properly decref on _pylong import error.
  • Improve the error message on _pylong TypeError.
  • Tie the return value comments together.

These are minor followups to issues not caught among the reviewers on #96673.

* Properly decref on _pylong import error.
* Improve the error message on _pylong TypeError.
* Tie the return value comments together.

These are minor followups to issues not caught among the reviewers on
python#96673.
@gpshead gpshead requested a review from nascheme November 3, 2022 19:22
@gpshead gpshead marked this pull request as ready for review November 3, 2022 19:22
gpshead referenced this pull request Nov 3, 2022
Add Python implementations of certain longobject.c functions. These use
asymptotically faster algorithms that can be used for operations on
integers with many digits. In those cases, the performance overhead of
the Python implementation is not significant since the asymptotic
behavior is what dominates runtime. Functions provided by this module
should be considered private and not part of any public API.

Co-author: Tim Peters <tim.peters@gmail.com>
Co-author: Mark Dickinson <dickinsm@gmail.com>
Co-author: Bjorn Martinsson
@nascheme
Copy link
Member

nascheme commented Nov 3, 2022

Aside from the cpython_only concern, this LTGM.

As they covers cpython internal details.
by adding the same check and TypeError on the to_decimal_string side.
@gpshead gpshead merged commit 4c4b5ce into python:main Nov 3, 2022
@gpshead gpshead deleted the _pylong_pr_followup_fixes branch November 3, 2022 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants