summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-10-10 16:00:28 (GMT)
committerGuido van Rossum <guido@python.org>1996-10-10 16:00:28 (GMT)
commitb5fa1cb855a641d029eed5309cb34da0e94a2d40 (patch)
tree3fbe928ba51e050b02360f2071b4f596135d5484
parent5f2aa7113da2f59dd59616a6603784ad2a05f47a (diff)
downloadcpython-b5fa1cb855a641d029eed5309cb34da0e94a2d40.zip
cpython-b5fa1cb855a641d029eed5309cb34da0e94a2d40.tar.gz
cpython-b5fa1cb855a641d029eed5309cb34da0e94a2d40.tar.bz2
Don't add names that start with _
-rw-r--r--Lib/pyclbr.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py
index f6f5bb9..a8a51af 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: