helpers.py 文件源码

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

项目:pylongecity 作者: cyrbon 项目源码 文件源码
def has_links(posts: List[Post], *patterns, **kwargs) -> Iterable[Post]:
    '''
    Returns all posts which have matching links in them.
    Args:
        post (List[Post]): Posts to filter
        *patterns (List[str]): Patterns which links should match
        not (List[str]) : Patterns which links should not match. E.g., not=['google', 'longecity', 'amazon']

    '''
    return filter(lambda p: (len(match_links(p, *patterns, **kwargs)) > 0), posts)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号