check on numerical value?

Kragen Sitaker kragen at pobox.com
Sun Jun 9 02:31:42 CEST 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