[Python-checkins] python/dist/src/Doc/tools undoc_symbols.py,1.4,1.5

theller@sourceforge.net theller@sourceforge.net
Tue, 16 Apr 2002 08:04:58 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv21122

Modified Files:
	undoc_symbols.py 
Log Message:
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.


Index: undoc_symbols.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/undoc_symbols.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** undoc_symbols.py	29 Nov 2001 04:30:46 -0000	1.4
--- undoc_symbols.py	16 Apr 2002 15:04:56 -0000	1.5
***************
*** 47,51 ****
  # x extern and forward variable declarations
  
! import os, glob, re, sys, tempfile
  
  def findnames(file, prefixes=()):
--- 47,51 ----
  # x extern and forward variable declarations
  
! import os, glob, re, sys
  
  def findnames(file, prefixes=()):
***************
*** 84,88 ****
      names.sort()
      for name in names:
!         if docs.find(name) == -1:
              print dict[name], name
  
--- 84,88 ----
      names.sort()
      for name in names:
!         if not re.search("%s\\W" % name, docs):
              print dict[name], name