Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Problems in parse_string #60
Bug 1 :
Hey @darkblaze69 thanks for your interest.
This is not a bug.
I'm not so sure about this request. I'm fundamentally torn on the idea. At its heart bitmath is a library intended to finally do units right. The allowed inputs are strict and the output is always accurate and predictable.
On the other hand, it might be useful to introduce a new function (or find a way to extend
Maybe I can come up with something that meets your requirements...
added a commit
Jul 14, 2016
@darkblaze69 I pushed a new branch for testing. It's called
Docs are viewable here for now, search this file for "parse_string_unsafe": https://raw.githubusercontent.com/tbielawa/bitmath/shell_unit_parser/docsite/source/module.rst
Here's a code block demonstrating the specific examples you listed in your original issue report:
import bitmath print bitmath.parse_string_unsafe('7.5KB') 7.5 kB print bitmath.parse_string_unsafe("4.7MB") 4.7 MB print bitmath.parse_string_unsafe("4.7M") 4.7 MB
Ill get to work on that next!
Thanks for testing for me!
You'll get an update in this thread once i submit all the updates
On Jul 16, 2016 12:55 PM, "darkblaze69" email@example.com wrote:
@darkblaze69 New uploads have been pushed to
Docs have been updated quite thoroughly (you're thanked in the news update: http://bitmath.readthedocs.io/en/latest/NEWS.html#bitmath-1-3-1-1 )
Also, I added a toggle-switch so you can force the input to parse as base-2 if you want instead of base-10.
TODO: Create the PPA builds for:
TODO: Create the Fedora/EPEL builds for: