mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-25 01:38:36 +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):
|
elif isinstance(atom, pr.Literal):
|
||||||
return [compiled.create(self, atom.eval())]
|
return [compiled.create(self, atom.eval())]
|
||||||
else:
|
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):
|
def _eval_trailer(self, types, trailer):
|
||||||
trailer_op, node = trailer.children[:2]
|
trailer_op, node = trailer.children[:2]
|
||||||
|
|||||||
Reference in New Issue
Block a user