check on numerical value?

Kragen Sitaker kragen at pobox.com
Sat Jun 8 20:31:42 EDT 2002


"Shagshag13" <shagshag13 at yahoo.fr> writes:
> can't you use (after importing types) type(x) == types.FloatType (or type.IntType)

Don't do that.  See "isinstance considered harmful",
http://lists.canonical.org/pipermail/kragen-tol/2002-January/000659.html.




More information about the Python-list mailing list