How can I detect if the caller passed any variables to my function in Python?
- by Felix Schwarz
I guess the subject sounds pretty stupid, so I'll show some code:
def foo(**kwargs):
# How can you detect the difference between (**{}) and ()?
pass
foo(**{})
foo()
Is there any way to detect inside of foo, how the method was called?