diff --git a/numpydoc/docscrape.py b/numpydoc/docscrape.py index ab3e458a..1f03cf0d 100644 --- a/numpydoc/docscrape.py +++ b/numpydoc/docscrape.py @@ -128,8 +128,8 @@ class NumpyDocString(collections.Mapping): 'See Also': [], 'Notes': [], 'Warnings': [], - 'References': '', - 'Examples': '', + 'References': [], + 'Examples': [], 'index': {} } @@ -365,8 +365,6 @@ def _parse(self): existing_content = self.get(section, []) if existing_content: existing_content += [''] - else: - existing_content = [] self[section] = existing_content + content def _error_location(self, msg, error=True):