system.py 文件源码

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

项目:My-Web-Server-Framework-With-Python2.7 作者: syjsu 项目源码 文件源码
def python_version_string(version=None):
    """
    Convert a numeric Python version (such as ``sys.hexversion``) to a
    printable string.

    :Parameters:
        version : int
            Python integer version

    :rtype:  str
    :return: The stringified version
    """
    major, minor, micro, release_level, serial = split_python_version(version)
    s = '%d.%d' % (major, minor)
    if micro > 0:
        s += '.%d' % micro

    if release_level != 'final':
        s += release_level[0]
        s += '%s' % serial

    return s
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号