circuitpython/tests/basics/class_misc.py

10 lines
131 B
Python
Raw Normal View History

# converting user instance to buffer
class C:
pass
c = C()
try:
d = bytearray(c)
except TypeError:
print('TypeError')