mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +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])
|
||||
for trailer in element.children[1:]:
|
||||
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)
|
||||
elif element.type in ('testlist_star_expr', 'testlist',):
|
||||
# The implicit tuple in statements.
|
||||
|
||||
@@ -48,6 +48,14 @@ a = 3 * "a"
|
||||
#? str()
|
||||
a
|
||||
|
||||
a = 3 * "a"
|
||||
#? str()
|
||||
a
|
||||
|
||||
#? int()
|
||||
(3 ** 3)
|
||||
#? int() str()
|
||||
(3 ** 'a')
|
||||
|
||||
# -----------------
|
||||
# assignments
|
||||
|
||||
Reference in New Issue
Block a user