On this page
  1. sys.set_coroutine_origin_tracking_depth
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

sys.set_coroutine_origin_tracking_depth

Prev: sys.set_asyncgen_hooks | Up: sys | Next: sys.set_int_max_str_digits
Rel: sys.activate_stack_trampoline, sys.addaudithook, sys.audit, sys.breakpointhook
Ref: docs.python.org — sys.set_coroutine_origin_tracking_depth
Tags: #public #python3 #stdlib #sys


Import

import sys
from sys import set_coroutine_origin_tracking_depth

Signature & Overview

sys.set_coroutine_origin_tracking_depth(depth)

Enable or disable origin tracking for coroutine objects in this thread.

Usage

import sys

old = sys.get_coroutine_origin_tracking_depth()
sys.set_coroutine_origin_tracking_depth(5)
try:
    assert sys.get_coroutine_origin_tracking_depth() == 5
finally:
    sys.set_coroutine_origin_tracking_depth(old)

Gotchas

REPL Inspect

from sys import set_coroutine_origin_tracking_depth
help(set_coroutine_origin_tracking_depth)

Linked from

Related notes