def foo(a, b): if a < b: params = {'a': 'b'} print params else: print {'c': 'd'}