_environ_config.py 文件源码

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

项目:environ_config 作者: hynek 项目源码 文件源码
def _env_to_bool(val):
    """
    Convert *val* to a bool if it's not a bool in the first place.
    """
    if isinstance(val, bool):
        return val
    val = val.strip().lower()
    if val in ("1", "true", "yes"):
        return True

    return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号