diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-30 23:58:08 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-31 00:03:53 +0200 |
commit | e62a0fe36776f039149e7fab77323aa380b97c2e (patch) | |
tree | ccc4552c55bcc250365c3347c662ab5ecf72161f /tests/basics | |
parent | 31619cc5893b8066799e663683ea9a7ea29602e1 (diff) | |
download | micropython-e62a0fe36776f039149e7fab77323aa380b97c2e.tar.gz micropython-e62a0fe36776f039149e7fab77323aa380b97c2e.zip |
objstr: Allow to convert any buffer proto object to str.
Original motivation is to support converting bytearrays, but easier to just
support buffer protocol at all.
Diffstat (limited to 'tests/basics')
-rw-r--r-- | tests/basics/bytearray1.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/basics/bytearray1.py b/tests/basics/bytearray1.py index d8e669506b..76e7e59753 100644 --- a/tests/basics/bytearray1.py +++ b/tests/basics/bytearray1.py @@ -18,6 +18,8 @@ print(a[1:]) print(a[:-1]) print(a[2:3]) +print(str(bytearray(b"123"), "utf-8")) + # Comparisons print(bytearray([1]) == bytearray([1])) print(bytearray([1]) == bytearray([2])) |