MCPcopy Index your code
hub / github.com/python/cpython / _call_with_frames_removed

Function _call_with_frames_removed

Lib/importlib/_bootstrap.py:483–491  ·  view source on GitHub ↗

remove_importlib_frames in import.c will always remove sequences of importlib frames that end with a call to this function Use it instead of a normal call in places where including the importlib frames introduces unwanted noise into the traceback (e.g. when executing module code)

(f, *args, **kwds)

Source from the content-addressed store, hash-verified

481
482# Frame stripping magic ###############################################
483def _call_with_frames_removed(f, *args, **kwds):
484 """remove_importlib_frames in import.c will always remove sequences
485 of importlib frames that end with a call to this function
486
487 Use it instead of a normal call in places where including the importlib
488 frames introduces unwanted noise into the traceback (e.g. when executing
489 module code)
490 """
491 return f(*args, **kwds)
492
493
494def _verbose_message(message, *args, verbosity=1):

Callers 6

create_moduleMethod · 0.85
exec_moduleMethod · 0.85
find_specMethod · 0.85
exec_moduleMethod · 0.85
_find_and_load_unlockedFunction · 0.85
_handle_fromlistFunction · 0.85

Calls 1

fFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…