try:
some_object_iterator = iter(some_object)
except TypeError, te:
print some_object, 'is not iterable'
本文共 149 字,大约阅读时间需要 1 分钟。
try:
some_object_iterator = iter(some_object)
except TypeError, te:
print some_object, 'is not iterable'
转载于:https://my.oschina.net/hsting/blog/61014