diff options
author | Damien George <damien.p.george@gmail.com> | 2016-01-22 16:19:32 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-01-26 15:27:00 +0000 |
commit | a53af6c87540c41fdf34211ea99ee794cae6d160 (patch) | |
tree | af67226b9674b4643e318d53be2be117d8c52d0c /py/qstrdefs.h | |
parent | f5c42dd9d199aa61b16ad54a73531eefbb0be3eb (diff) |
extmod/modurandom: Add some extra random functions.
Functions added are:
- randint
- randrange
- choice
- random
- uniform
They are enabled with configuration variable
MICROPY_PY_URANDOM_EXTRA_FUNCS, which is disabled by default. It is
enabled for unix coverage build and stmhal.
Diffstat (limited to 'py/qstrdefs.h')
-rw-r--r-- | py/qstrdefs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/py/qstrdefs.h b/py/qstrdefs.h index dd76c3d43..122fca128 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -686,4 +686,11 @@ Q(dupterm) Q(urandom) Q(getrandbits) Q(seed) +#if MICROPY_PY_URANDOM_EXTRA_FUNCS +Q(randrange) +Q(randint) +Q(choice) +Q(random) +Q(uniform) +#endif #endif |