OpenOPC.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:opc-rest-api 作者: matzpersson 项目源码 文件源码
def type_check(tags):
   """Perform a type check on a list of tags"""

   if type(tags) in (types.ListType, types.TupleType):
      single = False
   elif tags == None:
      tags = []
      single = False
   else:
      tags = [tags]
      single = True

   if len([t for t in tags if type(t) not in types.StringTypes]) == 0:
      valid = True
   else:
      valid = False

   return tags, single, valid
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号