GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — `pretty-format-json` modifies floating point numbers that have too many digits of precision · Issue #780 · pre-commit/pre-commit-hooks Open Description
BackgroundI have to work with JSON files that may be generated by non-python programs. These files, for whatever reason, have numbers that have up to 16 digits after the decimal place. (It's absurd, really. The people taking these measurements are somehow able to measure 0.1μHz on a 10GHz scale?? Yeah, they're saving values like Steps to Reproduce
Expected Output:{
"foo": 4.4257052820783003
}Actual Output:{
"foo": 4.4257052820783
}The diff from expected is: {
- "foo": 4.4257052820783003
+ "foo": 4.4257052820783
}Version Info
DiscussionThis might be something that has to be fixed within the python builtin I've created a test case for this. See my high-precision-numbers branch or the diff. I'll see if I have time to actually fix this, but I don't expect to Reacted by Simon Kocurek and jvoravong Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |