We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9899716 commit be836eaCopy full SHA for be836ea
strings/string_is_valid_number.py
@@ -100,7 +100,7 @@ def classify_char(char: str) -> CharType | None:
100
return None
101
102
103
-def is_valid_number(s: str) -> bool:
+def is_valid_number(number_string: str) -> bool:
104
"""
105
This function checks if the input string represents a valid number.
106
@@ -161,7 +161,7 @@ def is_valid_number(s: str) -> bool:
161
valid_final_states = {State.WHOLE, State.FRACTION, State.EXP_NUMBER}
162
current_state = State.INITIAL
163
164
- for char in s:
+ for char in number_string:
165
char_type = classify_char(char)
166
if char_type is None or char_type not in state_machine[current_state]:
167
return False
0 commit comments