blob: c308240a78da5b79377a090d53b2e1a1d3561544 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
"""
categories: Syntax,Spaces
description: uPy requires spaces between literal numbers and keywords, CPy doesn't
cause: Unknown
workaround: Unknown
"""
try:
print(eval("1and 0"))
except SyntaxError:
print("Should have worked")
try:
print(eval("1or 0"))
except SyntaxError:
print("Should have worked")
try:
print(eval("1if 1else 0"))
except SyntaxError:
print("Should have worked")
|