Pythonic way to determine if a string is a number
lists at cheimes.de
Sun Feb 15 13:27:47 EST 2009
Philip Semanchuk schrieb:
> On Feb 15, 2009, at 12:46 PM, python at bdurham.com wrote:
>> What's the Pythonic way to determine if a string is a number? By
>> number I mean a valid integer or float.
> is_an_int = True
> is_an_int = False
Please don't teach new Python developers to use bare excepts. In fact
never use bare excepts at all!
More information about the Python-list