File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,11 @@ There are a few functions specific to Python functions.
167
167
If *event * is ``PyFunction_EVENT_CREATE ``, then the callback is invoked
168
168
after `func ` has been fully initialized. Otherwise, the callback is invoked
169
169
before the modification to *func * takes place, so the prior state of *func *
170
- can be inspected.
170
+ can be inspected. The runtime is permitted to optimize away the creation of
171
+ function objects when possible. In such cases no event will be emitted.
172
+ Although this creates the possitibility of an observable difference of
173
+ runtime behavior depending on optimization decisions, it does not change
174
+ the semantics of the Python code being executed.
171
175
172
176
If the callback returns with an exception set, it must return ``-1 ``; this
173
177
exception will be printed as an unraisable exception using
You can’t perform that action at this time.
0 commit comments