def dictfilter(d=None, **kw):
 d = (kw if (d is None) else (dict(d, **kw) if kw else d))
 return {k: v for (k, v) in items(d) if (v is not None)}

def dictfilter ( d = None , ** kw ) : d = ( kw if ( d is None ) else ( dict ( d , ** kw ) if kw else d ) ) return { k : v for ( k , v ) in items ( d ) if ( v is not None ) }
remove all keys from dict d whose value is :const:none .