Okay lets say i have a list, and i want to check if that list exists within another list. I can do that doing this:
all(value in some_map for value in required_values)
Which works fine, but lets say i want to the raise an exception when a required value is missing, with the value that it is missing. How can i do that using list comprehension?
I'm more or less curious, all signs seem to point to no.
EDIT Argh I meant this:
for value in required_values:
if value not in some_map:
raise somecustomException(value)
Looking at those i cant see how i can find the value where the error occured