This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients christian.heimes, gousaiyang, miss-islington, pablogsal, steve.dower, vstinner, zkonge
Date 2021-03-12.23:50:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615593011.7.0.503490563142.issue43439@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-03-12 23:50:11steve.dowersetrecipients: + steve.dower, vstinner, christian.heimes, pablogsal, miss-islington, zkonge, gousaiyang
2021-03-12 23:50:11steve.dowersetmessageid: <1615593011.7.0.503490563142.issue43439@roundup.psfhosted.org>
2021-03-12 23:50:11steve.dowerlinkissue43439 messages
2021-03-12 23:50:11steve.dowercreate