On this page
sys.get_coroutine_origin_tracking_depth
Prev: sys.get_asyncgen_hooks | Up: sys | Next: sys.get_int_max_str_digits
Rel: sys.activate_stack_trampoline, sys.addaudithook, sys.audit, sys.breakpointhook
Ref: docs.python.org — sys.get_coroutine_origin_tracking_depth
Tags: #public #python3 #stdlib #sys
Import
import sys
from sys import get_coroutine_origin_tracking_depth
Signature & Overview
sys.get_coroutine_origin_tracking_depth()
Check status of origin tracking for coroutine objects in this thread.
Usage
import sys
depth = sys.get_coroutine_origin_tracking_depth()
assert isinstance(depth, int) and depth >= 0
Gotchas
0means disabled: Increase withset_coroutine_origin_tracking_depth(n)when debugging where an unawaited coroutine was created.
REPL Inspect
from sys import get_coroutine_origin_tracking_depth
help(get_coroutine_origin_tracking_depth)
Linked from
Related notes
- tuts/python3/stdlib_module/sys/get_asyncgen_hooks Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/get_int_max_str_digits Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sys/activate_stack_trampoline Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/addaudithook Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/audit Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/breakpointhook Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/call_tracing shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/deactivate_stack_trampoline shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/displayhook shared tags: #stdlib, #sys