If you do more than a little, then you can use something like a decorator.
def with_x(x, fn, name=None): def foo(*args, **kwargs): return fn(x, *args, **kwargs) if name: foo.__name__ = name return foo def example(x,y): return x**y g = with_x(2, example) g(3)
Use the name = parameter if you care about the name of the function to get. If necessary, you can introduce the built-in functions with other hacks, using, perhaps, the check module. But then you rewrote the previously mentioned functools component to avoid having to give keyword arguments.
user1969453
source share