Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> writes: >> I want to check that a value is a number. [...] > I'm leaning towards an isinstance check
Well that is the answer to your question, whether the value *is* a number. EAFP can answer the question whether the value *behaves* like a number, where the criterion depends on what your code is aiming to do with the value. BTW what if the value is Not-a-Number? ;-) -- Pete Forman -- http://mail.python.org/mailman/listinfo/python-list