diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-10-11 16:31:41 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-10-11 16:31:41 +0200 |
commit | 361e248001cdc69f2c3328cc1071646ca8f61f27 (patch) | |
tree | c7813eaf07a6fd4e6231008115874f01f07aa333 /inference.py | |
parent | f529b2e487e546d2266f7477a6ca998f11773014 (diff) | |
download | astroid-git-361e248001cdc69f2c3328cc1071646ca8f61f27.tar.gz |
Bytes: are just constants like Str and Num
Diffstat (limited to 'inference.py')
-rw-r--r-- | inference.py | 3 |
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__) |