diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2014-01-16 09:54:37 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2014-01-16 09:54:37 +0200 |
commit | 2899329f569e425a34c105f66d556735a86d91b7 (patch) | |
tree | 606696a67bf6cf8a2afc564e8909df546849d16c /rebuilder.py | |
parent | 872a87ae09603674f5173b6c551ab171e899693b (diff) | |
download | astroid-git-2899329f569e425a34c105f66d556735a86d91b7.tar.gz |
Make the compare only once.
Diffstat (limited to 'rebuilder.py')
-rw-r--r-- | rebuilder.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rebuilder.py b/rebuilder.py index ef4e56ff..2f6cf44d 100644 --- a/rebuilder.py +++ b/rebuilder.py @@ -87,6 +87,7 @@ REDIRECT = {'arguments': 'Arguments', 'keyword': 'Keyword', 'Repr': 'Backquote', } +PY3K = sys.version_info >= (3, 0) def _init_set_doc(node, newnode): newnode.doc = None @@ -335,7 +336,7 @@ class TreeRebuilder(object): if not newnode.bases: # no base classes, detect new / style old style according to # current scope - if sys.version_info >= (3, 0): + if PY3K: newnode._newstyle = True else: newnode._newstyle = metaclass in ('type', 'ABCMeta') |