summaryrefslogtreecommitdiff
path: root/inference.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2014-10-27 00:35:18 +0200
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2014-10-27 00:35:18 +0200
commit09cd8b7eefb021f2d8327e42614bca7cbb8915f2 (patch)
treee54d46837b31f00197106ad6f104f3444c65b521 /inference.py
parent1c5cab5ce9c6bf5c2a161748d03a5fa44a69e15e (diff)
downloadastroid-git-09cd8b7eefb021f2d8327e42614bca7cbb8915f2.tar.gz
Make the source compatible with Python 2.7 and 3.3+.
Diffstat (limited to 'inference.py')
-rw-r--r--inference.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/inference.py b/inference.py
index 3f216ddf..6cd4b787 100644
--- a/inference.py
+++ b/inference.py
@@ -265,12 +265,12 @@ nodes.Global._infer = path_wrapper(infer_global)
def infer_subscript(self, context=None):
"""infer simple subscription such as [1,2,3][0] or (1,2,3)[-1]"""
- value = self.value.infer(context).next()
+ value = next(self.value.infer(context))
if value is YES:
yield YES
return
- index = self.slice.infer(context).next()
+ index = next(self.slice.infer(context))
if index is YES:
yield YES
return