Consider supporting CPython's random compatibility #201
Labels
A-core
Area: Core Mersenne Twister implementation.
A-crate-features
Area: Compile-time features or attributes.
C-enhancement
Category: New feature or request.
In order to support CPython there are only a couple small changes required. I would like to suggest a
MtPython
struct that would generate values according to the CPython source code.I am willing to write the code myself and submit a PR.
If you think that this doesn't suit your library, please consider at least adding this information to the README or the documentation.
Rust reference implementation:
CPython random seed using bytearray: https://github.com/python/cpython/blob/ce558e69d4087dd3653207de78345fbb8a2c7835/Modules/_randommodule.c#LL355C8-L355C8
CPython
random.random()
implementation: https://github.com/python/cpython/blob/ce558e69d4087dd3653207de78345fbb8a2c7835/Modules/_randommodule.c#L181Related to #192
The text was updated successfully, but these errors were encountered: