[New-bugs-announce] [issue38892] Audit Hook doc typos and confusion

Terry J. Reedy report at bugs.python.org
Thu Nov 21 21:32:59 EST 2019


New submission from Terry J. Reedy <tjreedy at udel.edu>:

Some suggestions for
https://docs.python.org/3.9/c-api/sys.html#c.PySys_AddAuditHook
https://docs.python.org/3.9/library/sys.html#sys.addaudithook

"Adds to the collection of active auditing hooks"
"Adds the callable hook to the collection of active auditing hooks"

Change 'Adds' to 'Add' or maybe 'Append' (see near below).
Insert 'the callable hook' in PySys version.
Change 'collection' to 'sequence' or 'list' (and change verb to 'append') since order is important.

PySys version:

I think the 'userData' explanation should be closer to the top.  

Grammar: "Functions in the runtime and standard library that raise events include the details in each function’s documentation and listed in the audit events table." is not a proper sentence.  Its 'skeleton' is "Functions ... include the details ... and listed ... .  

Either change 'include the details' to 'are detailed' and 'listed' to 'are listed' or split into two sentences:

"Functions in the runtime and standard library that raise events are  listed in the audit events table.  Details are in each function’s documentation.

Both, again:

"raises a auditing event".  'a' should be  'an'.  To me, this is slightly confusing because Python raises exceptions, but auditing events are not exceptions and do not normally abort execution.  Perhaps "This call is a 'sys.addaudithook' event with no arguments that triggers an audit call."


https://docs.python.org/3.9/c-api/sys.html#c.PySys_Audit
https://docs.python.org/3.9/library/sys.html#sys.audit

Change 'Raises' to 'Raise'.


https://docs.python.org/3.8/library/audit_events.html

On pydev, Steve said "(though some won't be raised until 3.8.1... we should probably mark those, or at least update that page to warn that events may have been added over time)."

----------
assignee: docs at python
components: Documentation, Interpreter Core
messages: 357240
nosy: christian.heimes, docs at python, steve.dower, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Audit Hook doc typos and confusion
type: behavior
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38892>
_______________________________________


More information about the New-bugs-announce mailing list