Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix misformatting of floats with leading zeros #464

Merged
merged 2 commits into from
Aug 20, 2018

Conversation

JelleZijlstra
Copy link
Collaborator

This is a bug in my previous code: it ended up turning "0.06" into "0.6".

The solution in this diff is a bit hacky, but it has the virtue of being correct, unlike the previous code.

It might be worth thinking about this part of the style some more: Should we even put underscores in the part of floats behind the decimal point? If so, should we count the groups from the end, like we do now, or from the beginning? (The difference between 0.12_345_678 and 0.123_456_78.)

@coveralls
Copy link

coveralls commented Aug 20, 2018

Pull Request Test Coverage Report for Build 644

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.056%

Totals Coverage Status
Change from base Build 641: 0.0%
Covered Lines: 2679
Relevant Lines: 2789

💛 - Coveralls

@JelleZijlstra JelleZijlstra merged commit d4f0521 into psf:master Aug 20, 2018
@JelleZijlstra JelleZijlstra deleted the fixfloats branch August 20, 2018 15:19
@JelleZijlstra JelleZijlstra mentioned this pull request Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants