[Python-checkins] python/dist/src/Lib/encodings __init__.py,1.17,1.18 idna.py,1.1,1.2 punycode.py,1.1,1.2

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Thu, 24 Apr 2003 09:03:23 -0700


Update of /cvsroot/python/python/dist/src/Lib/encodings
In directory sc8-pr-cvs1:/tmp/cvs-serv21022/Lib/encodings

Modified Files:
	__init__.py idna.py punycode.py 
Log Message:
Whitespace normalization.


Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/__init__.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** __init__.py	3 Apr 2003 04:49:11 -0000	1.17
--- __init__.py	24 Apr 2003 16:02:49 -0000	1.18
***************
*** 121,123 ****
  # Register the search_function in the Python codec registry
  codecs.register(search_function)
- 
--- 121,122 ----

Index: idna.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/idna.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** idna.py	18 Apr 2003 10:39:52 -0000	1.1
--- idna.py	24 Apr 2003 16:02:49 -0000	1.2
***************
*** 20,27 ****
          newlabel.append(stringprep.map_table_b2(c))
      label = u"".join(newlabel)
!     
      # Normalize
      label = unicodedata.normalize("NFKC", label)
!     
      # Prohibit
      for c in label:
--- 20,27 ----
          newlabel.append(stringprep.map_table_b2(c))
      label = u"".join(newlabel)
! 
      # Normalize
      label = unicodedata.normalize("NFKC", label)
! 
      # Prohibit
      for c in label:
***************
*** 140,144 ****
      # Step 8: return the result of step 5
      return result
!         
  ### Codec APIs
  
--- 140,144 ----
      # Step 8: return the result of step 5
      return result
! 
  ### Codec APIs
  
***************
*** 157,161 ****
  
      def decode(self,input,errors='strict'):
!         
          if errors != 'strict':
              raise UnicodeError, "Unsupported error handling "+errors
--- 157,161 ----
  
      def decode(self,input,errors='strict'):
! 
          if errors != 'strict':
              raise UnicodeError, "Unsupported error handling "+errors

Index: punycode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/punycode.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** punycode.py	18 Apr 2003 10:39:52 -0000	1.1
--- punycode.py	24 Apr 2003 16:02:49 -0000	1.2
***************
*** 10,14 ****
  
  def segregate(str):
!     """3.1 Basic code point segregation""" 
      base = []
      extended = {}
--- 10,14 ----
  
  def segregate(str):
!     """3.1 Basic code point segregation"""
      base = []
      extended = {}
***************
*** 67,71 ****
              delta = 0
          oldchar = char
!             
      return result
  
--- 67,71 ----
              delta = 0
          oldchar = char
! 
      return result
  
***************
*** 104,108 ****
      bias = divisions + (36 * delta // (delta + 38))
      return bias
!     
  
  def generate_integers(baselen, deltas):
--- 104,108 ----
      bias = divisions + (36 * delta // (delta + 38))
      return bias
! 
  
  def generate_integers(baselen, deltas):
***************
*** 156,160 ****
          w = w * (36 - t)
          j += 1
!         
  
  def insertion_sort(base, extended, errors):
--- 156,160 ----
          w = w * (36 - t)
          j += 1
! 
  
  def insertion_sort(base, extended, errors):
***************
*** 194,198 ****
      extended = extended.upper()
      return insertion_sort(base, extended, errors)
!         
  ### Codec APIs
  
--- 194,198 ----
      extended = extended.upper()
      return insertion_sort(base, extended, errors)
! 
  ### Codec APIs