summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2016-08-17 14:51:20 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2016-08-17 14:51:20 (GMT)
commit54005afeeebddbd5b211307b743b591a4cdb7750 (patch)
tree221615466106ab352cb39ff7ee578a5017c783f1 /Doc/howto
parent3da57436ba6265de2a6abb3846e6e3a8e2c02322 (diff)
downloadcpython-54005afeeebddbd5b211307b743b591a4cdb7750.zip
cpython-54005afeeebddbd5b211307b743b591a4cdb7750.tar.gz
cpython-54005afeeebddbd5b211307b743b591a4cdb7750.tar.bz2
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@
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/pyporting.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst
index c479f22..696f8e7 100644
--- a/Doc/howto/pyporting.rst
+++ b/Doc/howto/pyporting.rst
@@ -299,7 +299,7 @@ access e.g. the ``importlib.abc`` module by doing the following::
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 @@ Python 2::
import sys
- if sys.version[0] > 2:
+ if sys.version_info[0] > 2:
from importlib import abc
else:
from importlib2 import abc