check whether a value is scalar

harold dadapapa at googlemail.com
Sat Apr 22 17:09:00 EDT 2006


would

    isinstance(value,(type(None),str,int,float,bool))

be enough? This yields true if the type value is in the list of type
objects given as second argument, or a subtype of one of them. What,
however, do you mean with "I care about the value only, and not its
class method"?




More information about the Python-list mailing list