decide if an instance is the given object
isinstance(
object,
classinfo)
- if ((isinstance(data, str) or isinstance(data, unicode)) and
-
data.strip().startswith('<')):
-
result = True
classinfo can be:
Sequence Types — str, unicode, list, tuple, bytearray, buffer, xrange
Numeric Types — int, float, long, complex
isinstance('1', str), the result is True
阅读(847) | 评论(0) | 转发(0) |