mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Don't add names that start with _
This commit is contained in:
parent
5f2aa7113d
commit
b5fa1cb855
1 changed files with 4 additions and 1 deletions
|
@ -154,8 +154,11 @@ def readmodule(module, path = []):
|
||||||
# only add a name if not
|
# only add a name if not
|
||||||
# already there (to mimic what
|
# already there (to mimic what
|
||||||
# Python does internally)
|
# Python does internally)
|
||||||
|
# also don't add names that
|
||||||
|
# start with _
|
||||||
for n in d.keys():
|
for n in d.keys():
|
||||||
if not dict.has_key(n):
|
if n[0] != '_' and \
|
||||||
|
not dict.has_key(n):
|
||||||
dict[n] = d[n]
|
dict[n] = d[n]
|
||||||
continue
|
continue
|
||||||
if is_class.match(line) >= 0:
|
if is_class.match(line) >= 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue