Message111934
A couple of notes on the patch:
- the test_unicodedata failure was a result of computing a checksum involving str(numeric_value_of_character) for fraction characters like 1/6 and 2/3. I've changed the test to use '{.12g}'.format(numeric_value) instead, and updated the checksum.
- the patch changes the result of format(x, ''), so that it continues to match str(x) when x is a float or complex instance. So when there's no typecode and no precision given, float formatting behaves like repr/str; when there's no typecode but a precision *is* given, float formatting behaves like 'g' formatting, but always ensures at least one digit after the point for a result in non-scientific format (as before).
This change involves some slightly messy logic in formatter.h (which now needs to pass type 'r' to PyOS_double_to_string in this case); there may be a better way to write this code. Eric, if you have a chance to look at the formatter.h changes, I'd appreciate your comments. |
|
Date |
User |
Action |
Args |
2010-07-29 14:19:08 | mark.dickinson | set | recipients:
+ mark.dickinson, eric.smith |
2010-07-29 14:19:08 | mark.dickinson | set | messageid: <1280413148.35.0.940869610178.issue9337@psf.upfronthosting.co.za> |
2010-07-29 14:19:06 | mark.dickinson | link | issue9337 messages |
2010-07-29 14:19:06 | mark.dickinson | create | |
|