Inconsistency with the taskMgr and extraArgs

This issue came up in the IRC channel about the inconsistency of the behaviour of taskMgr when using extraArgs. If you use taskMgr.add(func, “name”, extraArgs=[1,2]), the function doesn’t recieve the task argument anymore. You can get the task back as an argument with appendTask=True but then the task comes at the end of the argument list.

Is there any reason why this should be? It seems more consistent to me to have task functions always expect a Task object as its first argument. I would understand if a rewrite to make it more consistent would break backwards compatibility and thus have some bad sides but I think this is one case where making the behaviour consistent would be good.

And not everyone wants to accept the task all the time.

Right, the omission of the Task argument was an intentional decision, to support those cases when you don’t actually want to receive such a thing.

I don’t think of it as inconsistent. I think of it this way: if you don’t supply an extraArgs parameter, the default value is [task].