__init__.py 文件源码

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

项目:cattrs 作者: Tinche 项目源码 文件源码
def gen_attr_names():
    """
    Generate names for attributes, 'a'...'z', then 'aa'...'zz'.
    ~702 different attribute names should be enough in practice.
    Some short strings (such as 'as') are keywords, so we skip them.
    """
    lc = string.ascii_lowercase
    for c in lc:
        yield c
    for outer in lc:
        for inner in lc:
            res = outer + inner
            if keyword.iskeyword(res):
                continue
            yield outer + inner
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号