mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
removed many print statements, previously used for param debugging
This commit is contained in:
14
evaluate.py
14
evaluate.py
@@ -95,7 +95,6 @@ class Executable(object):
|
|||||||
self.var_args.parent_stmt)
|
self.var_args.parent_stmt)
|
||||||
calls.values = values
|
calls.values = values
|
||||||
calls.keys = keys
|
calls.keys = keys
|
||||||
print 'arr_t', array_type
|
|
||||||
calls.type = array_type
|
calls.type = array_type
|
||||||
new_param = copy.copy(param)
|
new_param = copy.copy(param)
|
||||||
new_param._assignment_calls_calculated = True
|
new_param._assignment_calls_calculated = True
|
||||||
@@ -110,7 +109,6 @@ class Executable(object):
|
|||||||
#print '\n\nfunc_params', self.func, self.func.parent, self.func
|
#print '\n\nfunc_params', self.func, self.func.parent, self.func
|
||||||
if isinstance(self.func, InstanceElement):
|
if isinstance(self.func, InstanceElement):
|
||||||
# care for self -> just exclude it and add the instance
|
# care for self -> just exclude it and add the instance
|
||||||
#print '\n\nyes', self.func, self.func.instance
|
|
||||||
start_offset = 1
|
start_offset = 1
|
||||||
self_name = copy.copy(self.func.params[0].get_name())
|
self_name = copy.copy(self.func.params[0].get_name())
|
||||||
self_name.parent = self.func.instance
|
self_name.parent = self.func.instance
|
||||||
@@ -118,7 +116,6 @@ class Executable(object):
|
|||||||
|
|
||||||
param_dict = {}
|
param_dict = {}
|
||||||
for param in self.func.params:
|
for param in self.func.params:
|
||||||
# print 'para', param.get_name()
|
|
||||||
param_dict[str(param.get_name())] = param
|
param_dict[str(param.get_name())] = param
|
||||||
# There may be calls, which don't fit all the params, this just ignores
|
# There may be calls, which don't fit all the params, this just ignores
|
||||||
# it.
|
# it.
|
||||||
@@ -129,7 +126,6 @@ class Executable(object):
|
|||||||
# The value and key can both be null. There, the defaults apply.
|
# The value and key can both be null. There, the defaults apply.
|
||||||
# args / kwargs will just be empty arrays / dicts, respectively.
|
# args / kwargs will just be empty arrays / dicts, respectively.
|
||||||
key, value = next(var_arg_iterator, (None, None))
|
key, value = next(var_arg_iterator, (None, None))
|
||||||
print '\n\nlala', key, value
|
|
||||||
while key:
|
while key:
|
||||||
try:
|
try:
|
||||||
key_param = param_dict[str(key)]
|
key_param = param_dict[str(key)]
|
||||||
@@ -148,8 +144,6 @@ class Executable(object):
|
|||||||
array_type = None
|
array_type = None
|
||||||
if assignment[0] == '*':
|
if assignment[0] == '*':
|
||||||
# *args param
|
# *args param
|
||||||
print '\n\n3*', value, assignment
|
|
||||||
|
|
||||||
array_type = parsing.Array.TUPLE
|
array_type = parsing.Array.TUPLE
|
||||||
if value:
|
if value:
|
||||||
values.append(value)
|
values.append(value)
|
||||||
@@ -164,10 +158,8 @@ class Executable(object):
|
|||||||
array_type = parsing.Array.DICT
|
array_type = parsing.Array.DICT
|
||||||
if non_matching_keys:
|
if non_matching_keys:
|
||||||
keys, values = zip(*non_matching_keys)
|
keys, values = zip(*non_matching_keys)
|
||||||
print '\n\n**', keys, values, assignment
|
|
||||||
else:
|
else:
|
||||||
# normal param
|
# normal param
|
||||||
print 'normal', value
|
|
||||||
if value:
|
if value:
|
||||||
values = [value]
|
values = [value]
|
||||||
|
|
||||||
@@ -182,7 +174,6 @@ class Executable(object):
|
|||||||
def iterate():
|
def iterate():
|
||||||
# var_args is typically an Array, and not a list
|
# var_args is typically an Array, and not a list
|
||||||
for var_arg in self.var_args:
|
for var_arg in self.var_args:
|
||||||
print '\nv', var_arg
|
|
||||||
# *args
|
# *args
|
||||||
if var_arg[0] == '*':
|
if var_arg[0] == '*':
|
||||||
arrays = follow_call_list(self.scope, [var_arg[1:]])
|
arrays = follow_call_list(self.scope, [var_arg[1:]])
|
||||||
@@ -195,13 +186,11 @@ class Executable(object):
|
|||||||
for array in arrays:
|
for array in arrays:
|
||||||
for key, field in array.get_contents():
|
for key, field in array.get_contents():
|
||||||
yield key[0].name, field
|
yield key[0].name, field
|
||||||
print '**', var_arg
|
|
||||||
yield var_arg
|
yield var_arg
|
||||||
# normal arguments (including key arguments)
|
# normal arguments (including key arguments)
|
||||||
else:
|
else:
|
||||||
if len(var_arg) > 1 and var_arg[1] == '=':
|
if len(var_arg) > 1 and var_arg[1] == '=':
|
||||||
# this is a named parameter
|
# this is a named parameter
|
||||||
print '\nnix', var_arg[0].name, '\n'
|
|
||||||
yield var_arg[0].name, var_arg[2:]
|
yield var_arg[0].name, var_arg[2:]
|
||||||
else:
|
else:
|
||||||
yield None, var_arg
|
yield None, var_arg
|
||||||
@@ -213,7 +202,6 @@ class Executable(object):
|
|||||||
|
|
||||||
def push_back(self, key, value):
|
def push_back(self, key, value):
|
||||||
self.pushes.append((key,value))
|
self.pushes.append((key,value))
|
||||||
print 'pushed back', self.pushes
|
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return self
|
return self
|
||||||
@@ -228,8 +216,6 @@ class Executable(object):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
return next(self.iterator)
|
return next(self.iterator)
|
||||||
|
|
||||||
print 'va', self.var_args
|
|
||||||
|
|
||||||
return iter(PushBackIterator(iterate()))
|
return iter(PushBackIterator(iterate()))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user