mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Power operation was not implemented before.
This commit is contained in:
@@ -273,7 +273,9 @@ class Evaluator(object):
|
|||||||
types = self._eval_atom(element.children[0])
|
types = self._eval_atom(element.children[0])
|
||||||
for trailer in element.children[1:]:
|
for trailer in element.children[1:]:
|
||||||
if trailer == '**': # has a power operation.
|
if trailer == '**': # has a power operation.
|
||||||
raise NotImplementedError
|
right = self.eval_element(element.children[2])
|
||||||
|
types = set(precedence.calculate(self, types, trailer, right))
|
||||||
|
break
|
||||||
types = self.eval_trailer(types, trailer)
|
types = self.eval_trailer(types, trailer)
|
||||||
elif element.type in ('testlist_star_expr', 'testlist',):
|
elif element.type in ('testlist_star_expr', 'testlist',):
|
||||||
# The implicit tuple in statements.
|
# The implicit tuple in statements.
|
||||||
|
|||||||
@@ -48,6 +48,14 @@ a = 3 * "a"
|
|||||||
#? str()
|
#? str()
|
||||||
a
|
a
|
||||||
|
|
||||||
|
a = 3 * "a"
|
||||||
|
#? str()
|
||||||
|
a
|
||||||
|
|
||||||
|
#? int()
|
||||||
|
(3 ** 3)
|
||||||
|
#? int() str()
|
||||||
|
(3 ** 'a')
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# assignments
|
# assignments
|
||||||
|
|||||||
Reference in New Issue
Block a user