[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Mark Dickinson dicki...@gmail.com added the comment: Eric, any further thoughts about making this change in 2.7? Here's a patch that does it (I think). -- keywords: +patch Added file: http://bugs.python.org/file15412/issue3382_trunk.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith e...@trueblade.com added the comment: Thanks for looking at this, Mark. Your patch looks okay to me, but Objects/stringlib/formatter.h still has some 'F' - 'f' logic in it, although it turns out that it's wrong: #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 guess never was) executed. I'll remove it and add a test. It also looks like complex is still mapping 'F' to 'f'. I'll fix that, too, and add a test for it. Thanks again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith e...@trueblade.com added the comment: 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 okay, and if you don't have any objections, I'll commit this. While I'm at it I'll modify Objects/stringlib/formatter.h in py3k to keep them it sync with trunk. -- Added file: http://bugs.python.org/file15414/issue3382_trunk-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Changes by Eric Smith e...@trueblade.com: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Mark Dickinson dicki...@gmail.com added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith e...@trueblade.com added the comment: Committed (with a few more tests) in r76583. -- resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith e...@trueblade.com added the comment: Checked in to py3k in 72398. I'm reconsidering whether to make this change in 2.7. I might make the change there, I'll have to check on the impacts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith e...@trueblade.com added the comment: With the implementation of issue5859 (py3k only), the only case where this matters in NAN and INF. I'm going to address those in 3.1, and not make any change for 2.x. -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith e...@trueblade.com added the comment: If http://bugs.python.org/issue5859 is implemented, then this issue really just becomes making sure NAN and INF are uppercase. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Changes by Eric Smith e...@trueblade.com: -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith [EMAIL PROTECTED] added the comment: Unfortunately, I missed the window to get these into 3.0 and 2.6. Better luck for 3.1 and 2.7! -- versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith [EMAIL PROTECTED] added the comment: Implemented for trunk in r65069; for py3k in r65073. -- resolution: - accepted status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
Eric Smith [EMAIL PROTECTED] added the comment: Changes backed out, pending fixing on Windows. -- resolution: accepted - status: closed - open ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.
New submission from Eric Smith [EMAIL PROTECTED]: See http://mail.python.org/pipermail/python-dev/2008-July/081242.html for the discussion. Basically, 'F' did the same as 'f' because it was assumed that neither would ever produce an exponent. But they do, for numbers greater than about 1e50. Also, 'F' should produce 'NAN' for cases where 'f' produces 'nan'. -- assignee: eric.smith components: Interpreter Core keywords: easy messages: 69811 nosy: eric.smith severity: normal status: open title: Make '%F' and float.__format__('F') convert results to upper case. type: feature request versions: Python 2.6, Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3382 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com