This commit is contained in:
Dave Halter
2017-04-02 22:21:57 +02:00
parent 9f1dda04c0
commit 47c1b8fa07

View File

@@ -132,7 +132,12 @@ def find_syntax_node_name(evaluator, python_object):
# be something like ``email.utils``).
return module, path
name_str = python_object.__name__
try:
name_str = python_object.__name__
except AttributeError:
# Stuff like python_function.__code__.
return None, None
if name_str == '<lambda>':
return None, None # It's too hard to find lambdas.