[Python-checkins] CVS: python/dist/src/Tools/modulator modulator.py,1.7,1.7.12.1

Tim Peters tim_one@users.sourceforge.net
Fri, 20 Jul 2001 23:07:16 -0700


Update of /cvsroot/python/python/dist/src/Tools/modulator
In directory usw-pr-cvs1:/tmp/cvs-serv27169/descr/dist/src/Tools/modulator

Modified Files:
      Tag: descr-branch
	modulator.py 
Log Message:
Merge of trunk delta date2001-07-17b to date2001-07-21.  See PLAN.txt.


Index: modulator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/modulator/modulator.py,v
retrieving revision 1.7
retrieving revision 1.7.12.1
diff -C2 -r1.7 -r1.7.12.1
*** modulator.py	1999/02/18 14:22:05	1.7
--- modulator.py	2001/07/21 06:07:14	1.7.12.1
***************
*** 31,41 ****
  oops = 'oops'
  
  # Check that string is a legal C identifier
  def checkid(str):
      if not str: return 0
!     if not str[0] in string.letters+'_':
          return 0
      for c in str[1:]:
!         if not c in string.letters+string.digits+'_':
              return 0
      return 1
--- 31,44 ----
  oops = 'oops'
  
+ IDENTSTARTCHARS = string.ascii_letters + '_'
+ IDENTCHARS = string.ascii_letters + string.digits + '_'
+ 
  # Check that string is a legal C identifier
  def checkid(str):
      if not str: return 0
!     if not str[0] in IDENTSTARTCHARS:
          return 0
      for c in str[1:]:
!         if not c in IDENTCHARS:
              return 0
      return 1