Python Function to Test for Integer Type
15 Jun
2004
15 Jun
'04
1:48 p.m.
Hello. Does anyone know of a python function that returns a value based on whether or not its argument is an integer? Any help would be greatly appreciated. Thanks. - Asad
15 Jun
15 Jun
10:50 p.m.
New subject: [Zope] Re: Python Function to Test for Integer Type
Asad Habib wrote:
Hello. Does anyone know of a python function that returns a value based on whether or not its argument is an integer? Any help would be greatly appreciated. Thanks
from types import IntType type(x) = IntType or you can coerce it into an int: x = int(x) There are other approaches depending on what you want to achieve. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science
7965
Age (days ago)
7965
Last active (days ago)
1 comments
2 participants
participants (2)
-
Asad Habib -
Max M