Get the documentation string for an object if it is not inherited from its class.
(obj)
| 169 | return None |
| 170 | |
| 171 | def _getowndoc(obj): |
| 172 | """Get the documentation string for an object if it is not |
| 173 | inherited from its class.""" |
| 174 | try: |
| 175 | doc = object.__getattribute__(obj, '__doc__') |
| 176 | if doc is None: |
| 177 | return None |
| 178 | if obj is not type: |
| 179 | typedoc = type(obj).__doc__ |
| 180 | if isinstance(typedoc, str) and typedoc == doc: |
| 181 | return None |
| 182 | return doc |
| 183 | except AttributeError: |
| 184 | return None |
| 185 | |
| 186 | def _getdoc(object): |
| 187 | """Get the documentation string for an object. |
no test coverage detected