gh-136169: Update parameter name in fractions.from_float method#136172
gh-136169: Update parameter name in fractions.from_float method#136172sobolevn merged 1 commit intopython:mainfrom
Conversation
…pythonGH-136172) Update parameter name in fractions.from_float method (cherry picked from commit 9c0cb5b) Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
|
GH-136174 is a backport of this pull request to the 3.14 branch. |
…pythonGH-136172) Update parameter name in fractions.from_float method (cherry picked from commit 9c0cb5b) Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
|
GH-136175 is a backport of this pull request to the 3.13 branch. |
|
If anyone is interested in a follow-up, |
C extension method - doesn't, but for pure-Python case - does: >>> import inspect, _pydecimal, _decimal
>>> inspect.signature(_pydecimal.Decimal.from_float)
<Signature (f)>
>>> inspect.signature(_decimal.Decimal.from_float)
<Signature (f, /)>As explained in the issue thread, the argument name is not a part of API. IMO, this pr makes docs a little worse.
Have you find some such code? |
Ugh, yuck. I'm not sure then. It's probably safest to force the Python implementation to be positional-only. |
|
There is a long list of issues, related to pydecimal/decimal incompatibilities (mostly closed), e.g. #117056.
I'm not sure if it does make sense to maintain it. We have a mature C extension and, IMO, the decimal module can be optional. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
@terryjreedy This has already been backported see: 3.14, 3.13 |
…python#136172) Update parameter name in fractions.from_float method
…python#136172) Update parameter name in fractions.from_float method
…python#136172) Update parameter name in fractions.from_float method
…python#136172) Update parameter name in fractions.from_float method
…python#136172) Update parameter name in fractions.from_float method
fractions.Fraction.from_floatparameterfis documented asflt#136169📚 Documentation preview 📚: https://cpython-previews--136172.org.readthedocs.build/