]> granicus.if.org Git - python/commitdiff
#11182: remove the unused and undocumented pydoc.Scanner class. Patch by Martin...
authorEzio Melotti <ezio.melotti@gmail.com>
Thu, 18 Apr 2013 23:53:12 +0000 (02:53 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Thu, 18 Apr 2013 23:53:12 +0000 (02:53 +0300)
Lib/pydoc.py
Misc/ACKS
Misc/NEWS

index 4d681b0efa9776a9aeb44e12406c118ba92376ae..7505ccd2977a87fb94f9051bfb2f441614278e03 100755 (executable)
@@ -1984,30 +1984,6 @@ for modules whose name or summary contain the string "spam".
 
 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."""
 
index 734a17c763ee476e0178dd0d1f79ee3a47c28bd7..36b98b0f8ae3bbea07f029c2c1e45674ccc2ad3e 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -848,6 +848,7 @@ Ross Moore
 Ben Morgan
 Derek Morr
 James A Morrison
+Martin Morrison
 Derek McTavish Mounce
 Alessandro Moura
 Pablo Mouzo
index 098d3281f1dde67250883a1085249ae952130dbe..bccc52b05630d4e15bac8987126db2785ac57767 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -45,6 +45,9 @@ Core and Builtins
 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.