This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# probe: the other texts atof reads or refuses: spaces around a number, underscores, a lone exponent, words, an empty text, inf and nan
|
||||
def show(t: String):
|
||||
try:
|
||||
print(t, "->", atof(t))
|
||||
except e:
|
||||
print(t, "-> raised:", e)
|
||||
|
||||
|
||||
def main():
|
||||
show(" 2.5")
|
||||
show("2.5 ")
|
||||
show("1_000")
|
||||
show("1e")
|
||||
show("abc")
|
||||
show("")
|
||||
show("-")
|
||||
show("inf")
|
||||
show("nan")
|
||||
Reference in new issue
Block a user