diff options
author | Guido van Rossum <guido@python.org> | 1996-10-10 16:00:28 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-10-10 16:00:28 +0000 |
commit | 6acf301f659e340b9306cddcdb9874dbe7583924 (patch) | |
tree | 05dc35f67a1b86996e0d4392eb683b4d298c6079 /Lib/pyclbr.py | |
parent | f8f454b04550c4838a94415ae41f9e4fb1866c2a (diff) | |
download | cpython-6acf301f659e340b9306cddcdb9874dbe7583924.tar.gz |
Don't add names that start with _
Diffstat (limited to 'Lib/pyclbr.py')
-rw-r--r-- | Lib/pyclbr.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py index f6f5bb932e..a8a51afd1a 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: |