Something like:
for (a,b) in kwargs.iteritems(): if not b : del kwargs[a]
This code raise exception because changing of dictionary when
I like the variation of your second method:
res = dict((a, b) for (a, b) in kwargs.iteritems() if b is not None)
it's Pythonic and I don't think that ugly. A variation of your first is:
for (a, b) in list(kwargs.iteritems()): if b is None: del kwargs[a]