dtoolkit.util._exception.find_stack_level#
- dtoolkit.util._exception.find_stack_level() int [source]#
Find the first place in the stack that is not inside dtoolkit (test notwithstanding).
- Returns:
- int
The first place in the stack level.
Examples
>>> from warnings import warn >>> from dtoolkit.util._exception import find_stack_level >>> warn("Blah blah blah", stacklevel=find_stack_level())