From b5fa1cb855a641d029eed5309cb34da0e94a2d40 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 10 Oct 1996 16:00:28 +0000 Subject: [PATCH] Don't add names that start with _ --- Lib/pyclbr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py index f6f5bb932e9..a8a51afd1aa 100644 --- a/Lib/pyclbr.py +++ b/Lib/pyclbr.py @@ -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: