summaryrefslogtreecommitdiff
path: root/inference.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-10-11 16:31:41 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2010-10-11 16:31:41 +0200
commit361e248001cdc69f2c3328cc1071646ca8f61f27 (patch)
treec7813eaf07a6fd4e6231008115874f01f07aa333 /inference.py
parentf529b2e487e546d2266f7477a6ca998f11773014 (diff)
downloadastroid-git-361e248001cdc69f2c3328cc1071646ca8f61f27.tar.gz
Bytes: are just constants like Str and Num
Diffstat (limited to 'inference.py')
-rw-r--r--inference.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/inference.py b/inference.py
index 257177c0..25c5fed5 100644
--- a/inference.py
+++ b/inference.py
@@ -25,6 +25,7 @@ from __future__ import generators
__doctype__ = "restructuredtext en"
from itertools import chain
+import sys
try:
GeneratorExit # introduced in py2.5
@@ -52,6 +53,8 @@ _CONST_PROXY = {
unicode: MANAGER.astng_from_class(unicode),
}
_CONST_PROXY[type(None)].parent = _CONST_PROXY[bool].parent
+if sys.version_info >= (2, 6):
+ _CONST_PROXY[bytes] = MANAGER.astng_from_class(bytes)
# TODO : find a nicer way to handle this situation; we should at least
# be able to avoid calling MANAGER.astng_from_class(const.value.__class__)