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 5c70631 commit 2cd4c95Copy full SHA for 2cd4c95
tests/snippets/floats.py
@@ -206,6 +206,26 @@
206
# Test special case for lexer, float starts with a dot:
207
a = .5
208
assert a == 0.5
209
+assert 3.14 == float('3.14')
210
+src = """
211
+a = 3._14
212
+"""
213
+
214
+with assert_raises(SyntaxError):
215
+ exec(src)
216
217
+a = 3.__14
218
219
220
221
222
223
224
+a = 3.1__4
225
226
227
228
229
230
assert float.fromhex('0x0.0p+0') == 0.0
231
assert float.fromhex('-0x0.0p+0') == -0.0
0 commit comments