This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients abbeyj, eric.smith, mark.dickinson, tim.peters
Date 2009-06-05.13:58:49
SpamBayes Score 0.0003231948
Marked as misclassified No
Message-id <1244210331.08.0.595550617926.issue6198@psf.upfronthosting.co.za>
In-reply-to
Content
> Out of interest, what does '%#.0f' % 1.5 produce on
> Python 2.7/Windows?

Microsoft's float->string routines have always done "add a half and
chop" rounding.  So, yes, 1.5 rounds to 2 there.

> ...
> I suspect that we're in for some complaints when
> Windows users discover that Python 3.1 string
> formatting does round-half-to-even rather than
> the round-half-up they're used to in Python 2.x.

Historically, overall we've had more gripes from non-Windows users
complaining that, e.g., 2.5 does /not/ round up to 3 -- you can't win
here, so don't worry about it.  X-platform consistency is incompatible
with platform-specific behavior, and most users will agree consistency
is overwhelmingly more important.  Of course that won't deter them from
complaining ;-)
History
Date User Action Args
2009-06-05 13:58:51tim.peterssetrecipients: + tim.peters, mark.dickinson, eric.smith, abbeyj
2009-06-05 13:58:51tim.peterssetmessageid: <1244210331.08.0.595550617926.issue6198@psf.upfronthosting.co.za>
2009-06-05 13:58:49tim.peterslinkissue6198 messages
2009-06-05 13:58:49tim.peterscreate