Commits

Ezio Melotti committed 465cb5c

#11182: remove the unused and undocumented pydoc.Scanner class. Patch by Martin Morrison.

  • Participants
  • Parent commits bcfb688

Comments (0)

Files changed (3)

File Lib/pydoc.py

 
 help = Helper()
 
-class Scanner:
-    """A generic tree iterator."""
-    def __init__(self, roots, children, descendp):
-        self.roots = roots[:]
-        self.state = []
-        self.children = children
-        self.descendp = descendp
-
-    def next(self):
-        if not self.state:
-            if not self.roots:
-                return None
-            root = self.roots.pop(0)
-            self.state = [(root, self.children(root))]
-        node, children = self.state[-1]
-        if not children:
-            self.state.pop()
-            return self.next()
-        child = children.pop(0)
-        if self.descendp(child):
-            self.state.append((child, self.children(child)))
-        return child
-
-
 class ModuleScanner:
     """An interruptible scanner that searches module synopses."""
 
 Ben Morgan
 Derek Morr
 James A Morrison
+Martin Morrison
 Derek McTavish Mounce
 Alessandro Moura
 Pablo Mouzo
 Library
 -------
 
+- Issue #11182: remove the unused and undocumented pydoc.Scanner class.
+  Patch by Martin Morrison.
+
 - Issue #17741: Add ElementTree.IncrementalParser, an event-driven parser
   for non-blocking applications.