summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/build/lib/docstring.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/build/lib/docstring.py b/doc/build/lib/docstring.py
index 5d33667c7..441aed900 100644
--- a/doc/build/lib/docstring.py
+++ b/doc/build/lib/docstring.py
@@ -102,7 +102,9 @@ class ObjectDoc(AbstractDoc):
self.classes.append(ObjectDoc(class_))
def _is_private_name(self, name):
- if re.match(r'^__.*__$', name):
+ if name == '__weakref__':
+ return True
+ elif re.match(r'^__.*__$', name):
return False
elif name.startswith('_'):
return True