Eric V. Smith <e...@trueblade.com> added the comment:
Wouldn't the next thing you do be to convert it to a float, so you'd call float() twice? I think you'd be better off just catching the exception yourself, and using the result of float(). I'm opposed to such a simple function being a member of str or in the stdlib. In all of my years using Python with plenty of floats, I've never needed this function. The usual suggestion with such short functions it to just add them to your own utility library. ---------- components: +Interpreter Core nosy: +eric.smith versions: +Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43808> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com