Is there any way to check if an argument is an integer in Python? Offcourse, there is the int function but it chokes when passed an argument that is not a string and then the user is inconvenienced (it throws a ValueError to be specific). I guess I could check each digit of the integer to determine if its ASCII value falls within the appropriate range and if each digit passed this test, then the entire number would be an integer. Does anyone know of a simpler way that involves use of a predefined Python function? Likewise, does anyone know if a similar function exists to detect floating point numbers? Any help would be appreciated. Thanks.
- Asad _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )