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
system.py 文件源码
python
阅读 35
收藏 0
点赞 0
评论 0
评论列表
文章目录