If you put the following in Shell for applications , you will get '50.49'. This result is consistent both at runtime 2.5 and 2.7.
>> a = '%0.2f' % (round(float(u'50.485'), 2),)
>> a
'50.49'
However, if I put the same in my local MacBook Pro, working with python 2.7.1, I get '50.48'.
>> a = '%0.2f' % (round(float(u'50.485'), 2),)
>> a
'50.48'
Why is this different and how can I get consistency between my local machine and App Engine servers?
source
share