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 steve.dower, tholl
Date 2019-11-18.19:47:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574106445.85.0.930891338405.issue38622@roundup.psfhosted.org>
In-reply-to
Content
Typically, as soon as I merge, I spot an edge case issue.

PySys_Audit(n, "O", a) is deliberately going to treat 'a' as the tuple of arguments (when it is a tuple). This lets us simplify/optimise events where the event arguments match the function arguments exactly. If 'a' is not a tuple, it gets wrapped in one.

When 'a' is meant to be a single argument that _might_ be a tuple, such as in PyObj_FromPtr, the format string needs to be "(O)" to ensure it is treated as a one element tuple. This is just how Py_BuildValue works - multiple elements become a tuple and the parens are optional unless you want a one-element tuple.
History
Date User Action Args
2019-11-18 19:47:25steve.dowersetrecipients: + steve.dower, tholl
2019-11-18 19:47:25steve.dowersetmessageid: <1574106445.85.0.930891338405.issue38622@roundup.psfhosted.org>
2019-11-18 19:47:25steve.dowerlinkissue38622 messages
2019-11-18 19:47:25steve.dowercreate