Specially crafted docstrings sometimes lead to errors, fixes #1103
This commit is contained in:
1 parent
ba96c21f83
commit
91499565a9
3 files changed
+16
-3
No files matched your search
@@ -74,8 +74,10 @@ def eval_node(context, element):
|
||||
# For False/True/None
|
||||
if element.value in ('False', 'True', 'None'):
|
||||
return ContextSet(compiled.builtin_from_name(evaluator, element.value))
|
||||
# else: print e.g. could be evaluated like this in Python 2.7
|
||||
return NO_CONTEXTS
|
||||
if element.value == 'print':
|
||||
# print e.g. could be evaluated like this in Python 2.7
|
||||
return NO_CONTEXTS
|
||||
assert False, 'Cannot evaluate the keyword %s' % element
|
||||
elif typ == 'lambdef':
|
||||
return ContextSet(FunctionContext(evaluator, context, element))
|
||||
elif typ == 'expr_stmt':
|
||||
|
||||
Reference in new issue
Block a user