July 28, 2014
10:15 p.m.
In all honesty, I'd suggest that code which looks bad enough to warrant even considering this feature is probably badly in need of refactoring, at which point the problem will likely go away.
I often want to call functions with added (or removed, replaced) keywords from the call. args0 = dict(...) args1 = dict(...) def f(**kwargs): g(**(arg0 | kwargs | args1)) currently I have to write args = dict(...) def f(**kwargs): temp_args = dict(dic0) temp_args.update(kwargs) temp_args.update(dic1) g(**temp_args) It would also make the proposed feature to allow multiple kw args expansions in Python 3.5 easy to write by having f(**a, **b, **c) be equivalent to f(**(a | b | c)) -Alexander