commit | b5fa1cb855a641d029eed5309cb34da0e94a2d40 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Oct 10 16:00:28 1996 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Oct 10 16:00:28 1996 +0000 |
tree | 3fbe928ba51e050b02360f2071b4f596135d5484 | |
parent | 5f2aa7113da2f59dd59616a6603784ad2a05f47a [diff] [blame] |
Don't add names that start with _
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 @@ # 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: