diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2014-01-16 09:51:21 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2014-01-16 09:51:21 +0200 |
commit | 872a87ae09603674f5173b6c551ab171e899693b (patch) | |
tree | ebb51b1455787a226f30c24105e9b3244147e84f /rebuilder.py | |
parent | e6c7c322d96f63911da3ced497aadaf9968852c7 (diff) | |
download | astroid-git-872a87ae09603674f5173b6c551ab171e899693b.tar.gz |
All class nodes are marked as new style classes for Py3k, closes #12.
Diffstat (limited to 'rebuilder.py')
-rw-r--r-- | rebuilder.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rebuilder.py b/rebuilder.py index c9d2e218..ef4e56ff 100644 --- a/rebuilder.py +++ b/rebuilder.py @@ -335,7 +335,10 @@ class TreeRebuilder(object): if not newnode.bases: # no base classes, detect new / style old style according to # current scope - newnode._newstyle = metaclass in ('type', 'ABCMeta') + if sys.version_info >= (3, 0): + newnode._newstyle = True + else: + newnode._newstyle = metaclass in ('type', 'ABCMeta') newnode.parent.frame().set_local(newnode.name, newnode) return newnode |