circuitpython/tests/basics/class_bytes.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
158 B
Python
Raw Permalink Normal View History

2019-10-14 19:05:17 -04:00
class C1:
def __init__(self, value):
self.value = value
def __bytes__(self):
return self.value
c1 = C1(b"class 1")
print(bytes(c1))