Code: Select all
MicroPython v1.9.4-740-gdc23978dd on 2018-12-10; PYBv1.1 with STM32F405RG
Type "help()" for more information.
>>> from micropython import const
>>> a = const(1)
>>> b = const(int(1))
Traceback (most recent call last):
File "<stdin>", line 1
SyntaxError: constant must be an integer
>>> c = const(a+1)
Traceback (most recent call last):
File "<stdin>", line 1
SyntaxError: constant must be an integer