A few Python 2 fixes

This commit is contained in:
Dave Halter committed 2019-05-18 01:09:09 +02:00
1 parent cc68942ec1
commit 4176af337f
6 files changed
+13 -12

No files matched your search

+4
View File
@@ -180,6 +180,10 @@ def eval_atom(context, atom):
might be a name or a literal as well.
"""
if atom.type == 'name':
if atom.value in ('True', 'False', 'None'):
# Python 2...
return ContextSet([compiled.builtin_from_name(context.evaluator, atom.value)])
# This is the first global lookup.
stmt = tree.search_ancestor(
atom, 'expr_stmt', 'lambdef'