Paul Sokolovsky
6 years ago
committed by
Damien George
1 changed files with 7 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||
""" |
|||
categories: Types,bytes |
|||
description: bytes objects support .format() method |
|||
cause: MicroPython strives to be a more regular implementation, so if both `str` and `bytes` support ``__mod__()`` (the % operator), it makes sense to support ``format()`` for both too. Support for ``__mod__`` can also be compiled out, which leaves only ``format()`` for bytes formatting. |
|||
workaround: If you are interested in CPython compatibility, don't use ``.format()`` on bytes objects. |
|||
""" |
|||
print(b'{}'.format(1)) |
Loading…
Reference in new issue