clean up the is_callable stuff

This commit is contained in:
Dave Halter committed 2014-04-02 09:47:27 +02:00
1 parent 305b593f3b
commit 8ac9e16f3f
2 files changed
+2 -5

No files matched your search

-2
View File
@@ -542,8 +542,6 @@ class Script(object):
origins = cache.cache_call_signatures(_callable, user_stmt)
debug.speed('func_call followed')
print([classes.CallSignature(self._evaluator, o, call, index)
for o in origins])
return [classes.CallSignature(self._evaluator, o, call, index)
for o in origins if o.is_callable()]
+2 -3
View File
@@ -298,11 +298,10 @@ class BaseDefinition(object):
if isinstance(stripped, pr.Name):
stripped = stripped.parent
return (stripped.isinstance(er.Function, er.Class)
or stripped.isinstance(compiled.CompiledObject)
and stripped.type() in ('function', 'class'))
return stripped.is_callable()
@property
@cache.underscore_memoization
def params(self):
"""
Raises an ``AttributeError``if the definition is not callable.