]> granicus.if.org Git - python/commitdiff
Don't add names that start with _
authorGuido van Rossum <guido@python.org>
Thu, 10 Oct 1996 16:00:28 +0000 (16:00 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 10 Oct 1996 16:00:28 +0000 (16:00 +0000)
Lib/pyclbr.py

index f6f5bb932e9b3939d65d447abca0d4f958fcfa4c..a8a51afd1aadcdd02ad94d2bbf3a2d06074b6566 100644 (file)
@@ -154,8 +154,11 @@ def readmodule(module, path = []):
                                        # only add a name if not
                                        # already there (to mimic what
                                        # Python does internally)
+                                       # also don't add names that
+                                       # start with _
                                        for n in d.keys():
-                                               if not dict.has_key(n):
+                                               if n[0] != '_' and \
+                                                  not dict.has_key(n):
                                                        dict[n] = d[n]
                        continue
                if is_class.match(line) >= 0: