Use create_simple_object for a lot of use cases
This commit is contained in:
1 parent
2aa2005502
commit
3c78aad8b1
6 files changed
+15
-6
No files matched your search
@@ -124,7 +124,7 @@ class AbstractInstanceContext(Context):
|
||||
debug.warning('No __getitem__, cannot access the array.')
|
||||
return NO_CONTEXTS
|
||||
else:
|
||||
index_obj = compiled.create(self.evaluator, index)
|
||||
index_obj = compiled.create_simple_object(self.evaluator, index)
|
||||
return self.execute_function_slots(names, index_obj)
|
||||
|
||||
def py__iter__(self):
|
||||
|
||||
@@ -443,7 +443,7 @@ class FakeDict(_FakeArray):
|
||||
|
||||
def py__iter__(self):
|
||||
for key in self._dct:
|
||||
yield LazyKnownContext(compiled.create(self.evaluator, key))
|
||||
yield LazyKnownContext(compiled.create_simple_object(self.evaluator, key))
|
||||
|
||||
def py__getitem__(self, index):
|
||||
return self._dct[index].infer()
|
||||
|
||||
Reference in new issue
Block a user