Determine if a string is numeric: Difference between revisions

Content added Content deleted
(→‎{{header|Python}}: Handle None value for s with TypeError catching)
Line 1,090: Line 1,090:
try:
try:
i = float(s)
i = float(s)
except ValueError:
except ValueError, TypeError:
# not numeric
# not numeric
else:
else: