69dd013919
This generalises and simplifies the code and follows CPython behaviour.
See similar change for floats in a07fc5b640
.
Signed-off-by: Damien George <damien@micropython.org>
13 lines
194 B
Python
13 lines
194 B
Python
# Test parsing ints.
|
|
|
|
try:
|
|
bytearray
|
|
memoryview
|
|
except NameError:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
print(int(b"123"))
|
|
print(int(bytearray(b"123")))
|
|
print(int(memoryview(b"123")))
|