GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — gh-67790: Support basic formatting for Fraction by mdickinson · Pull Request #111320 · python/cpython Conversation
|
|
@serhiy-storchaka @ericvsmith Would either of you be interested in reviewing? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It is perhaps out of the scope of this PR or this issue, but it may be useful to provide options for:
1 1/2.3/1.# modifier):, ÷ (U+00F7), ⁄ (U+2044), ∕ (U+2215), ∶ (U+2236).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@serhiy-storchaka Thank you for reviewing!
Hmm, possibly. Now that I look at it, we're adding two ways to do exactly the same thing (that is, What do you think about simply dropping the
Yes, I think I'd rather leave these to a separate PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Looks fine to me. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Actually, I think I'd require the "d", just in case we want to do somethings else entirely without it. But I don't feel strongly about it. OTOH, note that for ints, the 'd' has no effect. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mdickinson It LGTM if drop 'd' and "integer-like". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @serhiy-storchaka and @ericvsmith for feedback.
Yes, I can see a case both ways, and part of me wants to require a presentation type for all non-trivial formatting. I think this is close enough to the obvious one way to do formatting for Fractions that I'm happy for it to be the "default" formatting, so not require a "d". I'll make that change. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks, Mark!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
https://build.opensuse.org/request/show/1140281 by user dirkmueller + anag+factory - update to 1.16: * Formatting support was improved, following CPython 3.13a3 as of python/cpython#111320 * Add support for Python 3.13 by using Cython 3.0.8 and calling math.gcd().
https://build.opensuse.org/request/show/1140281 by user dirkmueller + anag+factory - update to 1.16: * Formatting support was improved, following CPython 3.13a3 as of python/cpython#111320 * Add support for Python 3.13 by using Cython 3.0.8 and calling math.gcd().
https://build.opensuse.org/request/show/1140281 by user dirkmueller + anag+factory - update to 1.16: * Formatting support was improved, following CPython 3.13a3 as of python/cpython#111320 * Add support for Python 3.13 by using Cython 3.0.8 and calling math.gcd().
PR python#100161 added fancy float-style formatting for the Fraction type, but left us in a state where basic formatting for fractions (alignment, fill, minimum width, thousands separators) still wasn't supported. This PR adds that support. --------- Co-authored-by: Serhiy Storchaka <[email protected]>
PR python#100161 added fancy float-style formatting for the Fraction type, but left us in a state where basic formatting for fractions (alignment, fill, minimum width, thousands separators) still wasn't supported. This PR adds that support. --------- Co-authored-by: Serhiy Storchaka <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.