str currently has methods like isdecimal, isnumeric and isdigit, but there
isn't an isfloat check, which could be very handy.
a trivial implementation could be as simple as:
try:
float(self)
return True
except ValueError:
return False
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/KEUR54FVEE7FRY4RGLK4IGTJOTKXQH5H/
Code of Conduct: http://python.org/psf/codeofconduct/