Steve Dower <steve.do...@python.org> added the comment:

Passing a tuple as "O" just means it gets passed as-is, without wrapping it 
again. And yeah, I thought that was right here, but it's not. I didn't realise 
it's a varargs argument. So yeah, it should be wrapped again so that only a 
single argument is being passed to the hooks.

Alternatively, raising one event for each object would also be valid. These 
functions behave identically for "f(a, b)" and "f(a) + f(b)", so raising the 
event for each object before traversing it would simplify hooks (but have more 
of a performance impact... which I suspect is totally irrelevant here anyway, 
so I'd be +1.1 on this approach vs. +1 on passing the args as a single 
argument).

If new arguments are added later, we need to add new events. Defining event 
schemas as "arbitrary arguments that may change is the future" is totally 
against the intended design.

----------
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43439>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to