util.py 文件源码

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

项目:asttokens 作者: gristlabs 项目源码 文件源码
def match_token(token, tok_type, tok_str=None):
  """Returns true if token is of the given type and, if a string is given, has that string."""
  return token.type == tok_type and (tok_str is None or token.string == tok_str)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号