Jan-15-2022, 04:21 PM
I think Yoriz's solution is good if your method uses event when an event argument is provided. I don't like so much as a way to make your function callable with zero or one arguments. I don't like the idea of twisting the function arguments to fit the vagaries of who may be calling it. If you wanted to make everyone happy you could do this:
This allows for zero or more position arguments, all of which are unused. Such code is best avoided unless you really need it.
1 |
def updateMainTasks( * _): |