This is an archive of the discontinued Mercurial Phabricator instance.

py3: use '%f' for floats instead of '%s'
ClosedPublic

Authored by pulkit on Oct 5 2018, 4:33 PM.

Details

Summary

I remember Yuya saying we need to use bytestr() or '%r' because '%s' was clever.
Not sure it applies to this or not.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Oct 5 2018, 4:33 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Oct 5 2018, 9:28 PM
I remember Yuya saying we need to use bytestr() or '%r' because '%s' was clever.
Not sure it applies to this or not.

This should be fine since we don't care the prettiness of the debug output.

Last time, I pointed out that '%f' was incompatible since the value was a
version number, and '%f' would print it as '1.000000'.