diff --git a/numpydoc/docscrape.py b/numpydoc/docscrape.py index 4ee0f2e4..2c49ed84 100644 --- a/numpydoc/docscrape.py +++ b/numpydoc/docscrape.py @@ -499,10 +499,14 @@ def splitlines_x(s): for field, items in [('Methods', self.methods), ('Attributes', self.properties)]: if not self[field]: - self[field] = [ - (name, '', - splitlines_x(pydoc.getdoc(getattr(self._cls, name)))) - for name in sorted(items)] + doc_list = [] + for name in sorted(items): + try: + doc_item = pydoc.getdoc(getattr(self._cls, name)) + doc_list.append((name, '', splitlines_x(doc_item))) + except AttributeError: + pass # method doesn't exist + self[field] = doc_list @property def methods(self):