Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hg0428 committed Dec 19, 2021
1 parent 7b46fe4 commit 9c30fc4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Binary file modified __pycache__/boolean.cpython-38.pyc
Binary file not shown.
Binary file modified __pycache__/none.cpython-38.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def Boolean(what, line_num):
#print(separated)
isboolean = False
for i in [
"==", ">", "<", "!=", "<=", ">=", " and ", " or ", "True", "False",
"==", ">", "<", "!=", "<=", ">=", " and ", " or ", "true", "false",
" not "
]:
if i in separated[0] or i in separated[1]:
Expand All @@ -23,7 +23,7 @@ def Boolean(what, line_num):
#print("starting loop")
for i in separated[0]:
#print("NEW",newtext)
if i in ["True", "False", "none", " in "]:
if i in ["true", "false", "none", " in "]:
newtext += i
else:
a = Aardvark.gettype(i, line_num, dontcheck=["bool", "none", ])
Expand All @@ -38,7 +38,7 @@ def Boolean(what, line_num):
pass
number += 1
#print(newtext,eval(newtext))
return True, eval(newtext)
return True, eval(newtext.replace("true", "True").replace("false", 'False'))


@Aardvark.method("bool", "not")
Expand Down
2 changes: 1 addition & 1 deletion none.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __repr__(self):

@Aardvark.type("none")
def nonecheck(what, line_num):
if what == "none" or type(what) == none:
if what == "none" or what == "null" or type(what) == none:
return True, none()
else:
return False, what

0 comments on commit 9c30fc4

Please sign in to comment.