From: Guido van Rossum Date: Thu, 10 Oct 1996 16:00:28 +0000 (+0000) Subject: Don't add names that start with _ X-Git-Tag: v1.4~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b5fa1cb855a641d029eed5309cb34da0e94a2d40;p=thirdparty%2FPython%2Fcpython.git Don't add names that start with _ --- diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py index f6f5bb932e9b..a8a51afd1aad 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: