Need help on why this code snippet does not return as I'd expect
>>> a = 1
>>> v = ["a", "b", "c"]
>>> {e for e in v if locals().get(e) is None}
set(['a', 'c', 'b'])
I expected it to return set(['c', 'b'])
, just like if I build a list
>>> [e for e in v if locals().get(e) is None]
['b', 'c']