|
|
@ -1004,17 +1004,20 @@ def is_list_of_strings(items):
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
def list_union(a, b):
|
|
|
|
def list_union(a, b):
|
|
|
|
result = list(a)
|
|
|
|
result = []
|
|
|
|
for i in b:
|
|
|
|
for x in a:
|
|
|
|
if i not in result:
|
|
|
|
if x not in result:
|
|
|
|
result.append(i)
|
|
|
|
result.append(x)
|
|
|
|
|
|
|
|
for x in b:
|
|
|
|
|
|
|
|
if x not in result:
|
|
|
|
|
|
|
|
result.append(x)
|
|
|
|
return result
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
|
|
def list_intersection(a, b):
|
|
|
|
def list_intersection(a, b):
|
|
|
|
result = []
|
|
|
|
result = []
|
|
|
|
for i in a:
|
|
|
|
for x in a:
|
|
|
|
if i in b:
|
|
|
|
if x in b and x not in result:
|
|
|
|
result.append(i)
|
|
|
|
result.append(x)
|
|
|
|
return result
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
|
|
def safe_eval(expr, locals={}, include_exceptions=False):
|
|
|
|
def safe_eval(expr, locals={}, include_exceptions=False):
|
|
|
|