MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _getowndoc

Function _getowndoc

tools/python-3.11.9-amd64/Lib/pydoc.py:155–168  ·  view source on GitHub ↗

Get the documentation string for an object if it is not inherited from its class.

(obj)

Source from the content-addressed store, hash-verified

153 return None
154
155def _getowndoc(obj):
156 """Get the documentation string for an object if it is not
157 inherited from its class."""
158 try:
159 doc = object.__getattribute__(obj, '__doc__')
160 if doc is None:
161 return None
162 if obj is not type:
163 typedoc = type(obj).__doc__
164 if isinstance(typedoc, str) and typedoc == doc:
165 return None
166 return doc
167 except AttributeError:
168 return None
169
170def _getdoc(object):
171 """Get the documentation string for an object.

Callers 2

_finddocFunction · 0.85
_getdocFunction · 0.85

Calls 2

typeClass · 0.50
__getattribute__Method · 0.45

Tested by

no test coverage detected