diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2016-07-16 14:17:16 +0300 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2016-07-16 14:17:16 +0300 |
| commit | c61b992458e1b1b3d955abf11ac3b75c98a11503 (patch) | |
| tree | 1d83e532b407f73fb5a9b6bc817554a44ffe4689 /astroid/util.py | |
| parent | 579ccd51bea9f0e174fa24d8ad5b18032e622e9c (diff) | |
| download | astroid-git-c61b992458e1b1b3d955abf11ac3b75c98a11503.tar.gz | |
Make Uninferable have a false value by default.
Diffstat (limited to 'astroid/util.py')
| -rw-r--r-- | astroid/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/astroid/util.py b/astroid/util.py index 1111202f..f159fdb4 100644 --- a/astroid/util.py +++ b/astroid/util.py @@ -50,6 +50,11 @@ class Uninferable(object): def __call__(self, *args, **kwargs): return self + def __bool__(self): + return False + + __nonzero__ = __bool__ + def accept(self, visitor): func = getattr(visitor, "visit_uninferable") return func(self) |
