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')
|