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

bundles / IPython 9.18.0.dev / IPython / core / oinspect / getdoc

function

IPython.core.oinspect:getdoc

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

Signature

def getdoc(obj) → str | None

Summary

Stable wrapper around inspect.getdoc.

Extended Summary

This can't crash because of attribute problems.

It also attempts to call a getdoc() method on the given object. This allows objects which provide their docstrings via non-standard mechanisms (like Pyro proxies) to still be inspected by ipython's ? system.

Aliases

  • IPython.core.oinspect.getdoc