Author mark.dickinson
Recipients eric.araujo, eric.smith, ezio.melotti, mark.dickinson, rhettinger, skrah, terry.reedy
Date 2010-11-21.19:31:43
SpamBayes Score 2.28434e-05
Marked as misclassified No
Message-id <>
I think the change below is sufficient if we decide that the '#g' formatting should always have the given number of significant digits.

--- Lib/      (revision 86635)
+++ Lib/      (working copy)
@@ -3701,7 +3701,8 @@
                 self = self._round(precision+1, rounding)
             elif spec['type'] in 'fF%':
                 self = self._rescale(-precision, rounding)
-            elif spec['type'] in 'gG' and len(self._int) > precision:
+            elif spec['type'] in 'gG' and (len(self._int) > precision or
+                                           spec['alt']):
                 self = self._round(precision, rounding)
         # special case: zeros with a positive exponent can't be
         # represented in fixed point; rescale them to 0e0.
Date User Action Args
2010-11-21 19:31:45mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, terry.reedy, eric.smith, ezio.melotti, eric.araujo, skrah
2010-11-21 19:31:45mark.dickinsonsetmessageid: <>
2010-11-21 19:31:43mark.dickinsonlinkissue7094 messages
2010-11-21 19:31:43mark.dickinsoncreate