We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8d0f5c commit 831c883Copy full SHA for 831c883
tests/snippets/ints.py
@@ -232,3 +232,24 @@ def __int__(self):
232
assert_raises(TypeError, lambda: (1).__round__(None))
233
assert_raises(TypeError, lambda: (0).__round__(0.0))
234
assert_raises(TypeError, lambda: (1).__round__(0.0))
235
+
236
+assert 00 == 0
237
+assert 0_0 == 0
238
+assert 03.2 == 3.2
239
+assert 3+02j == 3+2j
240
241
+# Invalid syntax:
242
+src = """
243
+b = 02
244
+"""
245
246
+with assert_raises(SyntaxError):
247
+ exec(src)
248
249
250
251
+b = 03 + 2j
252
253
254
255
0 commit comments