You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
9162a87d4d
Using bytes will test the same path for the buffer protocol in py/objtype.c.
10 lines
127 B
Python
10 lines
127 B
Python
# converting user instance to buffer
|
|
class C:
|
|
pass
|
|
|
|
c = C()
|
|
try:
|
|
d = bytes(c)
|
|
except TypeError:
|
|
print('TypeError')
|