I want to be able to parse strings containing french units (mentiond here https://en.wikipedia.org/wiki/Octet_(computing)) , can you please support that?
This is the most interesting request for enhancement that I've received to date, @walidsa3d. I'm thrilled!
I like this part the most of all, it makes my job easier:
Let's get one thing straight first, you're specifically requesting that in addition to the currently supported prefix units:
... that there will be companion octet classes, such as the NIST-octet (base 2) classes:
... and the SI equivalents
Can you describe some use-cases for me? Such as what functionality you would want to interact with these units directly. Are you specifically looking to use the parse_string functionality? Honestly, I can't imagine why you'd want to code unusual units into any code, as far as sharing and comprehendability is concerned.
I'm not looking to reject this request, I only want to understand your use cases so I can better accommodate your request 👍
edited to fix the unit names in the list examples
Here is my use case : I was trying to convert human-readable strings like "1.5GB", "5MB" into bytes using parse_string. It worked until I stumbled on those french names: Mo instead of Mb, Go instead of Gb, Ko instead of Kb.
Cool! I think to keep things simple, as I'm not too keen on the idea of adding 23 more classes for obscure units, I might implement it initially such that:
I will write up some code later today after these meetings.
Add initial support for 'parsing french units' from request #53
Add documentation for parsing octet based units in the 'parse_string'
@walidsa3d please give this a review for me. Also, I've updated the parse_string docs to note the support for octets. Please give that a read over as well. It will appear here
once the docs rebuild.
Thanks, it works like charm :)