check if object is number

George Sakkis gsakkis at rutgers.edu
Fri Feb 11 16:13:52 EST 2005


"Michael Hartl" <mhartl at post.harvard.edu> wrote in message
news:1108155272.438423.177460 at l41g2000cwc.googlegroups.com...
> As luck would have it, isnumber is a built-in Python function:
>
> >>> isnumber(1)
> True
> >>> isnumber(1.0)
> True
> >>> isnumber('1')
> False
>
> Michael
>
> --
> Michael D. Hartl, Ph.D.
> Chief Technology Officer
> http://quarksports.com/
>

Huh ? What python version has this ? Surely not 2.3 and 2.4.

George






More information about the Python-list mailing list