diff options
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-x | Lib/platform.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/platform.py b/Lib/platform.py index c898dd1..04f7f9b 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -1254,10 +1254,10 @@ _sys_version_cache = {} def _sys_version(sys_version=None): """ Returns a parsed version of Python's sys.version as tuple - (name, version, branch, revision, buildno, builddate, compiler) - referring to the Python implementation name, version, branch, - revision, build number, build date/time as string and the compiler - identification string. + (name, version, branch, revision, buildno, builddate, compiler) + referring to the Python implementation name, version, branch, + revision, build number, build date/time as string and the compiler + identification string. Note that unlike the Python sys.version, the returned value for the Python version will always include the patchlevel (it @@ -1359,8 +1359,6 @@ def python_version(): will always include the patchlevel (it defaults to 0). """ - if hasattr(sys, 'version_info'): - return '%i.%i.%i' % sys.version_info[:3] return _sys_version()[1] def python_version_tuple(): @@ -1372,8 +1370,6 @@ def python_version_tuple(): will always include the patchlevel (it defaults to 0). """ - if hasattr(sys, 'version_info'): - return sys.version_info[:3] return tuple(_sys_version()[1].split('.')) def python_branch(): |