mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-02 14:53:45 +08:00
Power operation was not implemented before.
This commit is contained in:
1 parent
030131d705
commit
8d65129a19
2 files changed
+11
-1
No files matched your search
@@ -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