summaryrefslogtreecommitdiffstats
path: root/Doc/tools
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2002-04-16 15:04:56 (GMT)
committerThomas Heller <theller@ctypes.org>2002-04-16 15:04:56 (GMT)
commit0e661dcdbf35e5ff5589d401189a4459dd2341ea (patch)
tree8d64a51afbb59bfa8cf222febd5337905cfec585 /Doc/tools
parent4eaf50f4357587da0c444a4f40eb329f78680acc (diff)
downloadcpython-0e661dcdbf35e5ff5589d401189a4459dd2341ea.zip
cpython-0e661dcdbf35e5ff5589d401189a4459dd2341ea.tar.gz
cpython-0e661dcdbf35e5ff5589d401189a4459dd2341ea.tar.bz2
Replace the simpleminded string.find with a re.search looking only for
full words. Before that, something like 'PyObject_Call' was missed because 'PyObject_CallFunction' was found. Passes PyChecker now.
Diffstat (limited to 'Doc/tools')
-rw-r--r--Doc/tools/undoc_symbols.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tools/undoc_symbols.py b/Doc/tools/undoc_symbols.py
index d7a9e5d..3528106 100644
--- a/Doc/tools/undoc_symbols.py
+++ b/Doc/tools/undoc_symbols.py
@@ -46,7 +46,7 @@ INCLUDEPATTERN = "*.h"
# v variable definitions
# x extern and forward variable declarations
-import os, glob, re, sys, tempfile
+import os, glob, re, sys
def findnames(file, prefixes=()):
names = {}
@@ -83,7 +83,7 @@ def print_undoc_symbols(prefix, docdir, incdir):
names = dict.keys()
names.sort()
for name in names:
- if docs.find(name) == -1:
+ if not re.search("%s\\W" % name, docs):
print dict[name], name
if __name__ == '__main__':