diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2011-07-08 20:16:52 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2011-07-08 20:16:52 +0200 |
commit | 3cb6ffe887497bd37af6dd57ed28b98de102ae65 (patch) | |
tree | 791c32ff4f03276fe09b63c6d04b1145ff227570 /node_classes.py | |
parent | 11886551cfdcf969f0a661f8ab63c1fa1a6dd399 (diff) | |
download | astroid-git-3cb6ffe887497bd37af6dd57ed28b98de102ae65.tar.gz |
py3k: __builtin__ module renamed to builtins, we should consider this to properly build ast for builtin objects
Diffstat (limited to 'node_classes.py')
-rw-r--r-- | node_classes.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/node_classes.py b/node_classes.py index 2b50e0b9..4dd8520c 100644 --- a/node_classes.py +++ b/node_classes.py @@ -1,4 +1,4 @@ -# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com @@ -22,6 +22,7 @@ import sys +from logilab.astng import BUILTINS_MODULE from logilab.astng.exceptions import NoDefault from logilab.astng.bases import (NodeNG, Statement, Instance, InferenceContext, _infer_stmts, YES) @@ -489,7 +490,7 @@ class Dict(NodeNG, Instance): for k,v in items.iteritems()] def pytype(self): - return '__builtin__.dict' + return '%s.dict' % BUILTINS_MODULE def get_children(self): """get children of a Dict node""" @@ -664,7 +665,7 @@ class List(NodeNG, Instance, ParentAssignTypeMixin): self.elts = [const_factory(e) for e in elts] def pytype(self): - return '__builtin__.list' + return '%s.list' % BUILTINS_MODULE def getitem(self, index, context=None): return self.elts[index] @@ -731,7 +732,7 @@ class Set(NodeNG, Instance, ParentAssignTypeMixin): self.elts = [const_factory(e) for e in elts] def pytype(self): - return '__builtin__.set' # XXX __builtin__ vs builtins + return '%s.set' % BUILTINS_MODULE def itered(self): return self.elts @@ -813,7 +814,7 @@ class Tuple(NodeNG, Instance, ParentAssignTypeMixin): self.elts = [const_factory(e) for e in elts] def pytype(self): - return '__builtin__.tuple' + return '%s.tuple' % BUILTINS_MODULE def getitem(self, index, context=None): return self.elts[index] |