Skip to content

Commit 84dcb4e

Browse files
committed
docs: improve description on how int is also a float
1 parent 7d6dbc1 commit 84dcb4e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/diffpy/utils/validators.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
def is_number(string):
22
"""Check if the provided string can be converted to a float.
3+
4+
Since integers can be converted to floats, this function will return True for integers as well.
5+
Hence, we can use this function to check if a string is a number.
36
47
Parameters
58
----------

0 commit comments

Comments
 (0)