[Python-checkins] python/dist/src/Lib string.py,1.64,1.65

loewis@users.sourceforge.net loewis@users.sourceforge.net
Mon, 14 Oct 2002 13:03:44 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv6186

Modified Files:
	string.py 
Log Message:
Convert empty string literal to string. Speed up creation of idmap.


Index: string.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/string.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** string.py	3 Jun 2002 15:58:32 -0000	1.64
--- string.py	14 Oct 2002 20:03:40 -0000	1.65
***************
*** 35,41 ****
  
  # Case conversion helpers
! _idmap = ''
! for i in range(256): _idmap = _idmap + chr(i)
! del i
  
  # Backward compatible names for exceptions
--- 35,42 ----
  
  # Case conversion helpers
! # Use str to convert Unicode literal in case of -U
! l = map(chr, xrange(256))
! _idmap = str('').join(l)
! del l
  
  # Backward compatible names for exceptions