summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pydoc.py')
-rw-r--r--Lib/pydoc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 9e84292..922946e 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1435,7 +1435,8 @@ location listed above.
# List the built-in subclasses, if any:
subclasses = sorted(
(str(cls.__name__) for cls in type.__subclasses__(object)
- if not cls.__name__.startswith("_") and cls.__module__ == "builtins"),
+ if (not cls.__name__.startswith("_") and
+ getattr(cls, '__module__', '') == "builtins")),
key=str.lower
)
no_of_subclasses = len(subclasses)