[Python-checkins] CVS: python/dist/src/Tools/scripts gencodec.py,1.5,1.6

M.-A. Lemburg lemburg@users.sourceforge.net
Wed, 16 May 2001 02:41:47 -0700


Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory usw-pr-cvs1:/tmp/cvs-serv23495/Tools/scripts

Modified Files:
	gencodec.py 
Log Message:
Moved the encoding map building logic from the individual mapping
codec files to codecs.py and added logic so that multi mappings
in the decoding maps now result in mappings to None (undefined mapping)
in the encoding maps.



Index: gencodec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/gencodec.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** gencodec.py	2001/01/17 08:48:39	1.5
--- gencodec.py	2001/05/16 09:41:45	1.6
***************
*** 245,251 ****
  ### Encoding Map
  
! encoding_map = {}
! for k,v in decoding_map.items():
!     encoding_map[v] = k
  ''')
      return string.join(l,'\n')
--- 245,249 ----
  ### Encoding Map
  
! encoding_map = codecs.make_encoding_map(decoding_map)
  ''')
      return string.join(l,'\n')