py/modbuiltins: Make oct/hex work when !MICROPY_PY_BUILTINS_STR_OP_MODULO

Instead of redirecting to str.__mod__(), use str.format() in this case.
This commit is contained in:
Paul Sokolovsky
2018-09-16 07:23:53 +03:00
committed by Damien George
parent 2da5d41350
commit 93f29975db
2 changed files with 15 additions and 0 deletions

View File

@@ -37,8 +37,13 @@ Q()
Q(*)
Q(_)
Q(/)
#if MICROPY_PY_BUILTINS_STR_OP_MODULO
Q(%#o)
Q(%#x)
#else
Q({:#o})
Q({:#x})
#endif
Q({:#b})
Q( )
Q(\n)