mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-10 05:52:22 +08:00
Be able to differentiate tuple/list/dict.
This commit is contained in:
@@ -209,7 +209,10 @@ class Evaluator(object):
|
||||
elif isinstance(atom, pr.Literal):
|
||||
return [compiled.create(self, atom.eval())]
|
||||
else:
|
||||
return [iterable.Array(self, atom.children[1], pr.Array.LIST)]
|
||||
mapping = {'(': pr.Array.TUPLE,
|
||||
'[': pr.Array.LIST,
|
||||
'{': pr.Array.DICT}
|
||||
return [iterable.Array(self, atom.children[1], mapping[atom.children[0]])]
|
||||
|
||||
def _eval_trailer(self, types, trailer):
|
||||
trailer_op, node = trailer.children[:2]
|
||||
|
||||
Reference in New Issue
Block a user