-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Make '%F' and float.__format__('F') convert results to upper case. #47632
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
Comments
See http://mail.python.org/pipermail/python-dev/2008-July/081242.html |
Implemented for trunk in r65069; for py3k in r65073. |
Changes backed out, pending fixing on Windows. |
Unfortunately, I missed the window to get these into 3.0 and 2.6. |
If http://bugs.python.org/issue5859 is implemented, then this issue |
With the implementation of bpo-5859 (py3k only), the only case where |
Checked in to py3k in 72398. I'm reconsidering whether to make this |
Eric, any further thoughts about making this change in 2.7? Here's a |
Thanks for looking at this, Mark. Your patch looks okay to me, but Objects/stringlib/formatter.h still has #if PY_VERSION_HEX < 0x0301000
/* 'F' is the same as 'f', per the PEP */
/* This is no longer the case in 3.x */
if (type == 'F')
type = 'f';
#endif Note that it's missing a zero on the end, so this code is never (and I It also looks like complex is still mapping 'F' to 'f'. I'll fix that, Thanks again. |
Here's a patch which adds some tests and fixes complex. I'm currently testing with PY_NO_SHORT_FLOAT_REPR on Windows. If that's |
Looks good to me. |
Committed (with a few more tests) in r76583. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: