Message111934
| Author |
mark.dickinson |
| Recipients |
eric.smith, mark.dickinson |
| Date |
2010年07月29日.14:19:06 |
| SpamBayes Score |
1.7410852e-05 |
| Marked as misclassified |
No |
| Message-id |
<1280413148.35.0.940869610178.issue9337@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|