Dummy commit (just to test hooks)

This commit is contained in:
Miroslav Stampar 2018-12-10 13:10:01 +01:00
parent 4f1b0787ed
commit ef911b6be4

View File

@ -3509,9 +3509,9 @@ def listToStrValue(value):
return retVal
def intersect(valueA, valueB, lowerCase=False):
def intersect(containerA, containerB, lowerCase=False):
"""
Returns intersection of the array-ized values
Returns intersection of the container-ized values
>>> intersect([1, 2, 3], set([1,3]))
[1, 3]
@ -3519,15 +3519,15 @@ def intersect(valueA, valueB, lowerCase=False):
retVal = []
if valueA and valueB:
valueA = arrayizeValue(valueA)
valueB = arrayizeValue(valueB)
if containerA and containerB:
containerA = arrayizeValue(containerA)
containerB = arrayizeValue(containerB)
if lowerCase:
valueA = [val.lower() if isinstance(val, basestring) else val for val in valueA]
valueB = [val.lower() if isinstance(val, basestring) else val for val in valueB]
containerA = [val.lower() if isinstance(val, basestring) else val for val in containerA]
containerB = [val.lower() if isinstance(val, basestring) else val for val in containerB]
retVal = [val for val in valueA if val in valueB]
retVal = [val for val in containerA if val in containerB]
return retVal