You can fix one parameter of function call by calling underlying method of fixed parameter instead of using functools.partial or lambda statement.
Function from method: increment and decrement without function definition
inc = (1).__add__
print(inc(4))
#5
sub = (-1).__radd__
print(sub(5))
#4
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.