Tom McDermott
5 years ago
committed by
Damien George
2 changed files with 18 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||
""" |
|||
categories: Modules,struct |
|||
description: Struct pack with whitespace in format, whitespace ignored by CPython, error on uPy |
|||
cause: MicroPython is optimised for code size. |
|||
workaround: Don't use spaces in format strings. |
|||
""" |
|||
import struct |
|||
|
|||
try: |
|||
print(struct.pack('b b', 1, 2)) |
|||
print('Should have worked') |
|||
except: |
|||
print('struct.error') |
Loading…
Reference in new issue