forked from VimPlug/jedi
Fixed an issue with ArrayInstances that were using name lookups, which it doesn't have.
This commit is contained in:
@@ -156,7 +156,7 @@ class set():
|
|||||||
yield i
|
yield i
|
||||||
|
|
||||||
def pop(self):
|
def pop(self):
|
||||||
return self.__iterable.pop()
|
return list(self.__iterable)[-1]
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
return self
|
return self
|
||||||
|
|||||||
@@ -550,6 +550,11 @@ class ArrayInstance(IterableWrapper):
|
|||||||
Used for the usage of set() and list().
|
Used for the usage of set() and list().
|
||||||
This is definitely a hack, but a good one :-)
|
This is definitely a hack, but a good one :-)
|
||||||
It makes it possible to use set/list conversions.
|
It makes it possible to use set/list conversions.
|
||||||
|
|
||||||
|
In contrast to Array, ListComprehension and all other iterable types, this
|
||||||
|
is something that is only used inside `evaluate/compiled/fake/builtins.py`
|
||||||
|
and therefore doesn't need `names_dicts`, `py__bool__` and so on, because
|
||||||
|
we don't use these operations in `builtins.py`.
|
||||||
"""
|
"""
|
||||||
def __init__(self, evaluator, instance):
|
def __init__(self, evaluator, instance):
|
||||||
self._evaluator = evaluator
|
self._evaluator = evaluator
|
||||||
|
|||||||
Reference in New Issue
Block a user