For example, a python AWS lambda, the documented signature is:
def handler(event, context):
But the following is valid python syntax:
def handler(event, context, *args, **kwargs):
I've tested this and the lambda does not crashes. (BTW default arguments is also valid)
This would allow, for example, to decorate the handler function and then introduce extra arguments to the function. Think about a dependency injection scenario for example.
Is 'altering' the default signature considered bad practice in any way, and if so, in which way?