further progress in changing to py__call__

This commit is contained in:
Dave Halter
2014-07-30 14:40:56 +02:00
parent ccd304bcb7
commit 1e6a950aec
4 changed files with 17 additions and 10 deletions
+4 -5
View File
@@ -318,17 +318,16 @@ class Evaluator(object):
debug.dbg('execute: %s %s', obj, params)
try:
# Some stdlib functions like super(), namedtuple(), etc. have been
# hard-coded in Jedi to support them.
return stdlib.execute(self, obj, params)
except stdlib.NotInStdLib:
pass
if isinstance(obj, iterable.GeneratorMethod):
return obj.execute()
return obj.py__call__(params)
elif obj.isinstance(compiled.CompiledObject):
if obj.is_executable_class():
return [er.Instance(self, obj, params)]
else:
return list(obj.execute_function(self, params))
return obj.py__call__(self, params)
elif obj.isinstance(er.Class):
# There maybe executions of executions.
return obj.py__call__(params)