As the quoted ticket hints, I have the patches in my tree, and will push the for review (or directly to the repo) when other things in the queue are processed.
Add support for stdlib decimal.Decimal
I'd like to request adding the decimal standard library to micropython-lib.
https://docs.python.org/3/library/decimal.html
It's particularly useful for parsing and maintaining precision when reading values from peripherals (in my case, analytical balances) and displaying them on a screen without worrying about the issues associated with floating point arithmetic.
datetime implementation
Opened the issue to avoid other people trying to port Cpython's pure python datetime
implementation and find out that is blocked by the following micropython issue: https://github.com/micropython/micropython/pull/3391
That specific datetime implementation needs:
- time.strptime
And cpython tests need:
- decimal.Decimal
- test.support.is_resource_enabled
- test.support.requires_IEEE_754
- test.support.run_with_tz
- random.randrange (aliasing urandom)
Cool, thanks! is there any of the requirements that has not been developed yet?
So, I pushed the baseline CPython files to master, then https://github.com/micropython/micropython-lib/pull/234 presents my current patchset on top of that.
randrange() is discussed in https://github.com/micropython/micropython-lib/pull/208
Merged to mainline.
Thanks!
This would be nice to have indeed!