From bd5cdb0f6573587ae545d7e7f1c38715bf36b93d Mon Sep 17 00:00:00 2001 From: Joachim Le Fournis <43498612+RedGl0w@users.noreply.github.com> Date: Tue, 17 Nov 2020 19:10:43 +0100 Subject: [PATCH] [py] Support round on int --- python/port/mpconfigport.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/port/mpconfigport.h b/python/port/mpconfigport.h index 53c3bb90a..5fb249736 100644 --- a/python/port/mpconfigport.h +++ b/python/port/mpconfigport.h @@ -105,6 +105,9 @@ // Whether to include: randrange, randint, choice, random, uniform #define MICROPY_PY_URANDOM_EXTRA_FUNCS (1) +// Whether to support rounding of integers (incl bignum); eg round(123,-1)=120 +#define MICROPY_PY_BUILTINS_ROUND_INT (1) + // Function to seed URANDOM with on init #define MICROPY_PY_URANDOM_SEED_INIT_FUNC micropython_port_random()