[Python-checkins] cpython (3.5): Use sys.version_info, not sys.version.
zach.ware
python-checkins at python.org
Wed Aug 17 10:52:56 EDT 2016
https://hg.python.org/cpython/rev/df3a907d94cd
changeset: 102733:df3a907d94cd
branch: 3.5
parent: 102728:ac2bc921169c
user: Zachary Ware <zachary.ware at gmail.com>
date: Wed Aug 17 09:51:20 2016 -0500
summary:
Use sys.version_info, not sys.version.
sys.version[0] gives a string, which fails > comparison with 2.
Reported by Arne Maximilian Richter on docs@
files:
Doc/howto/pyporting.rst | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst
--- a/Doc/howto/pyporting.rst
+++ b/Doc/howto/pyporting.rst
@@ -299,7 +299,7 @@
import sys
- if sys.version[0] == 3:
+ if sys.version_info[0] == 3:
from importlib import abc
else:
from importlib2 import abc
@@ -311,7 +311,7 @@
import sys
- if sys.version[0] > 2:
+ if sys.version_info[0] > 2:
from importlib import abc
else:
from importlib2 import abc
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list