Skip to content

gh-73487: Convert _decimal to use Argument Clinic (part 6) - #138015

Merged
encukou merged 1 commit into
python:mainfrom
skirpichev:ac-decimal/73487-pt6
Aug 28, 2025
Merged

gh-73487: Convert _decimal to use Argument Clinic (part 6)#138015
encukou merged 1 commit into
python:mainfrom
skirpichev:ac-decimal/73487-pt6

Conversation

@skirpichev

@skirpichevskirpichev commented Aug 21, 2025

Copy link
Copy Markdown
Member

@serhiy-storchakaserhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

Comment threadModules/_decimal/_decimal.c
@skirpichev

Copy link
Copy Markdown
MemberAuthor

Docstrings diff:

--- ref.txt 2025-08-22 11:00:56.325746547 +0300+++ patch.txt 2025-08-22 10:49:32.335072600 +0300@@ -95,6 +95,8 @@
| traps=None
| )
|
+ | Create context.+ |
| The context affects almost all operations and controls rounding,
| Over/Underflow, raising of exceptions and much more. A new context
| can be constructed as follows:
@@ -182,12 +184,16 @@
| Copy the sign from y to x.
|
| create_decimal(self, num='0', /)
- | Create a new Decimal instance from num, using self as the context. Unlike the- | Decimal constructor, this function observes the context limits.+ | Create a new Decimal instance from num, using self as the context.+ |+ | Unlike the Decimal constructor, this function observes the context+ | limits.
|
| create_decimal_from_float(self, f, /)
- | Create a new Decimal instance from float f. Unlike the Decimal.from_float()- | class method, this function observes the context limits.+ | Create a new Decimal instance from float f.+ |+ | Unlike the Decimal.from_float() class method, this function observes+ | the context limits.
|
| divide(self, x, y, /)
| Return x divided by y.

@encukou
encukou merged commit ef4dd1d into python:mainAug 28, 2025
46 checks passed
@skirpichev
skirpichev deleted the ac-decimal/73487-pt6 branch August 28, 2025 10:44
Sign up for freeto 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

@skirpichev@serhiy-storchaka@encukou