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 -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/KEUR54FVEE7FRY4RGLK4IGTJOTKXQH5H/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to