gh-73487: Convert _decimal to use Argument Clinic (part 6)#138015
Merged
encukou merged 1 commit intopython:mainfrom Aug 28, 2025
Merged
gh-73487: Convert _decimal to use Argument Clinic (part 6)#138015encukou merged 1 commit intopython:mainfrom
encukou merged 1 commit intopython:mainfrom
Conversation
903fcca to
5a20bf0
Compare
Member
Author
|
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. |
lkollar
pushed a commit
to lkollar/cpython
that referenced
this pull request
Sep 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.