mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Fix power operation, fixes #1268
This commit is contained in:
@@ -84,7 +84,7 @@ def eval_node(context, element):
|
|||||||
had_await = True
|
had_await = True
|
||||||
first_child = children.pop(0)
|
first_child = children.pop(0)
|
||||||
|
|
||||||
context_set = eval_atom(context, first_child)
|
context_set = context.eval_node(first_child)
|
||||||
for trailer in children:
|
for trailer in children:
|
||||||
if trailer == '**': # has a power operation.
|
if trailer == '**': # has a power operation.
|
||||||
right = context.eval_node(children[1])
|
right = context.eval_node(children[1])
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ a
|
|||||||
#? int() str()
|
#? int() str()
|
||||||
(3 ** 'a')
|
(3 ** 'a')
|
||||||
|
|
||||||
|
class X():
|
||||||
|
foo = 2
|
||||||
|
#? int()
|
||||||
|
(X.foo ** 3)
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# assignments
|
# assignments
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user