diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2014-05-17 12:13:19 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-05-17 12:13:19 -0400 |
| commit | a504b224e7822d3e6d89a99e866f98b5b43e88d0 (patch) | |
| tree | 27265bd423cd0d800e5b4b81a63f0fe9c38c502c | |
| parent | e800f237c57ef7fdeff281dd622a8876d96bee26 (diff) | |
| download | python-setuptools-bitbucket-a504b224e7822d3e6d89a99e866f98b5b43e88d0.tar.gz | |
Compute PY3 directly and switch on that for clarity.
| -rw-r--r-- | setuptools/compat.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/setuptools/compat.py b/setuptools/compat.py index 7b824ba2..ec77127d 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -1,9 +1,9 @@ import sys import itertools -if sys.version_info[0] < 3: - PY3 = False +PY3 = sys.version_info >= (3,) +if not PY3: basestring = basestring import __builtin__ as builtins import ConfigParser @@ -34,9 +34,8 @@ if sys.version_info[0] < 3: exec("""def reraise(tp, value, tb=None): raise tp, value, tb""") -else: - PY3 = True +if PY3: basestring = str import builtins import configparser as ConfigParser |
