Commit 530f5672 authored by Zachary Ware's avatar Zachary Ware

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@
parent c7dc895d
...@@ -299,7 +299,7 @@ access e.g. the ``importlib.abc`` module by doing the following:: ...@@ -299,7 +299,7 @@ access e.g. the ``importlib.abc`` module by doing the following::
import sys import sys
if sys.version[0] == 3: if sys.version_info[0] == 3:
from importlib import abc from importlib import abc
else: else:
from importlib2 import abc from importlib2 import abc
...@@ -311,7 +311,7 @@ Python 2:: ...@@ -311,7 +311,7 @@ Python 2::
import sys import sys
if sys.version[0] > 2: if sys.version_info[0] > 2:
from importlib import abc from importlib import abc
else: else:
from importlib2 import abc from importlib2 import abc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment