This is a development version (9.14.0.dev) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.14.0.dev / IPython / core / oinspect / _get_wrapped

function

IPython.core.oinspect:_get_wrapped

source: /IPython/core/oinspect.py :299

Signature

def   _get_wrapped ( obj )

Summary

Get the original object if wrapped in one or more @decorators

Extended Summary

Some objects automatically construct similar objects on any unrecognised attribute access (e.g. unittest.mock.call). To protect against infinite loops, this will arbitrarily cut off after 100 levels of obj.__wrapped__ attribute access. --TK, Jan 2016

Aliases

  • IPython.core.oinspect._get_wrapped