summaryrefslogtreecommitdiffstats
path: root/Doc/library/types.rst
diff options
context:
space:
mode:
authorSaiyang Gou <gousaiyang@163.com>2020-10-20 19:23:15 (GMT)
committerGitHub <noreply@github.com>2020-10-20 19:23:15 (GMT)
commit3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7 (patch)
tree9618ece119809521ba77c603bfbd4a5c5691694d /Doc/library/types.rst
parent1d3469988e2c1f53ca84ffdc979d548c04ba3906 (diff)
downloadcpython-3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7.zip
cpython-3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7.tar.gz
cpython-3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7.tar.bz2
bpo-41192: Add documentation of undocumented audit events (GH-21308)
Diffstat (limited to 'Doc/library/types.rst')
-rw-r--r--Doc/library/types.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/library/types.rst b/Doc/library/types.rst
index e4a8dec..a5cf9ab 100644
--- a/Doc/library/types.rst
+++ b/Doc/library/types.rst
@@ -116,6 +116,11 @@ Standard names are defined for the following types:
The type of user-defined functions and functions created by
:keyword:`lambda` expressions.
+ .. audit-event:: function.__new__ code types.FunctionType
+
+ The audit event only occurs for direct instantiation of function objects,
+ and is not raised for normal compilation.
+
.. data:: GeneratorType
@@ -145,10 +150,11 @@ Standard names are defined for the following types:
The type for code objects such as returned by :func:`compile`.
- .. audit-event:: code.__new__ code,filename,name,argcount,posonlyargcount,kwonlyargcount,nlocals,stacksize,flags CodeType
+ .. audit-event:: code.__new__ code,filename,name,argcount,posonlyargcount,kwonlyargcount,nlocals,stacksize,flags types.CodeType
Note that the audited arguments may not match the names or positions
- required by the initializer.
+ required by the initializer. The audit event only occurs for direct
+ instantiation of code objects, and is not raised for normal compilation.
.. method:: CodeType.replace(**kwargs)