I am somehow familiar with list comprehensions in Python. But in situations when I need to check if the list is not None, the list comprehension would fail.
e.g.
tags = v.tags if tags: for t in tags: if t['Key'] == 'Name': # Do something Now, if tags is None, then the following list comprehension fails. It works fine if tags is empty/[]. I would like a list comprehension that checks against None.
[k for k,v in tags if tags]:
tags.. You can do this with empty collectors ([],(),{}) but not overNone.[k for k,v in (tags or [])]