fixed the dict problem, but dictionary completions are still very bad

This commit is contained in:
David Halter
2013-07-17 16:14:06 +02:00
parent 0dbfc409a7
commit 45c8cc739b
2 changed files with 9 additions and 8 deletions

View File

@@ -641,13 +641,14 @@ class Execution(Executable):
elif commands[0] == '**': elif commands[0] == '**':
arrays = evaluate.follow_call_list(commands[1:]) arrays = evaluate.follow_call_list(commands[1:])
for array in arrays: for array in arrays:
for key_stmt, value_stmt in array.items(): if isinstance(array, Array):
# first index, is the key if syntactically correct for key_stmt, value_stmt in array.items():
call = key_stmt.get_commands()[0] # first index, is the key if syntactically correct
if isinstance(call, pr.Name): call = key_stmt.get_commands()[0]
yield call, value_stmt if isinstance(call, pr.Name):
elif type(call) is pr.Call: yield call, value_stmt
yield call.name, value_stmt elif type(call) is pr.Call:
yield call.name, value_stmt
# Normal arguments (including key arguments). # Normal arguments (including key arguments).
else: else:
if stmt.assignment_details: if stmt.assignment_details:

View File

@@ -212,7 +212,7 @@ f()
d = dict({'a':''}) d = dict({'a':''})
def y(a): def y(a):
return a return a
#? str() #?
y(**d) y(**d)
# ----------------- # -----------------