dbworker.py 文件源码

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

项目:telegram-xkcd-password-generator 作者: MasterGroosha 项目源码 文件源码
def get_person(user_id):
    # Check if user exists
    S = Query()
    person = db.search(S.user_id == user_id)
    if len(person) is 0:
        usr = {"user_id": user_id,
               "word_count": DEFAULT_WORD_COUNT,
               "prefixes": DEFAULT_PREFIX_SUFFIX,
               "separators": DEFAULT_SEPARATOR}
        db.insert(usr)
        return usr
    return person[0]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号