circuitpython/tests/basics/bytearray_decode.py
stijn fb54736bdb py/objarray: Add decode method to bytearray.
Reuse the implementation for bytes since it works the same way regardless
of the underlying type.  This method gets added for CPython compatibility
of bytearray, but to keep the code simple and small array.array now also
has a working decode method, which is non-standard but doesn't hurt.
2019-05-21 14:24:04 +10:00

7 lines
140 B
Python

try:
print(bytearray(b'').decode())
print(bytearray(b'abc').decode())
except AttributeError:
print("SKIP")
raise SystemExit