Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Nov 29, 2009, 2:39 AM

Post #1 of 6 (180 views)
Permalink
[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

Mark Dickinson <dickinsm [at] gmail> 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 <report [at] bugs>
<http://bugs.python.org/issue3382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 29, 2009, 6:15 AM

Post #2 of 6 (172 views)
Permalink
[issue3382] Make '%F' and float.__format__('F') convert results to upper case. [In reply to]

Eric Smith <eric [at] trueblade> 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 <report [at] bugs>
<http://bugs.python.org/issue3382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 29, 2009, 9:06 AM

Post #3 of 6 (172 views)
Permalink
[issue3382] Make '%F' and float.__format__('F') convert results to upper case. [In reply to]

Eric Smith <eric [at] trueblade> 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 <report [at] bugs>
<http://bugs.python.org/issue3382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 29, 2009, 9:07 AM

Post #4 of 6 (173 views)
Permalink
[issue3382] Make '%F' and float.__format__('F') convert results to upper case. [In reply to]

Changes by Eric Smith <eric [at] trueblade>:


----------
versions: +Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 29, 2009, 9:12 AM

Post #5 of 6 (172 views)
Permalink
[issue3382] Make '%F' and float.__format__('F') convert results to upper case. [In reply to]

Mark Dickinson <dickinsm [at] gmail> added the comment:

Looks good to me.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 29, 2009, 9:41 AM

Post #6 of 6 (174 views)
Permalink
[issue3382] Make '%F' and float.__format__('F') convert results to upper case. [In reply to]

Eric Smith <eric [at] trueblade> added the comment:

Committed (with a few more tests) in r76583.

----------
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.