lv_micropython/tests/basics/int_bytes_optional_args_cp311.py

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

10 lines
281 B
Python
Raw Normal View History

# Check optional byteorder argument (CPython 3.11+)
print((10).to_bytes(1))
print((100).to_bytes(10))
print(int.from_bytes(b"\0\0\0\0\0\0\0\0\0\x01"))
print(int.from_bytes(b"\x01\0"))
# Check optional length argument (CPython 3.11+)
print((10).to_bytes())
print((100).to_bytes())