Skip to content

Commit 7713980

Browse files
validators created
1 parent b0b6676 commit 7713980

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

src/diffpy/utils/parsers/loaddata.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,4 @@ def _findDataBlocks(self):
333333
return
334334

335335

336-
# End of class TextDataLoader
337-
338-
339-
def isfloat(s):
340-
"""True if s is convertible to float."""
341-
try:
342-
float(s)
343-
return True
344-
except ValueError:
345-
pass
346-
return False
336+
# End of class TextDataLoader
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def isnumber(s):
2+
"""True if s is convertible to float."""
3+
try:
4+
float(s)
5+
return True
6+
except ValueError:
7+
pass
8+
return False

0 commit comments

Comments
 (0)