[Python-checkins] CVS: python/dist/src/Lib/encodings __init__.py,1.1,1.2

Barry A. Warsaw python-dev@python.org
Mon, 20 Mar 2000 11:36:29 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Lib/encodings
In directory anthem:/home/bwarsaw/projects/python/Lib/encodings

Modified Files:
	__init__.py 
Log Message:
On 17-Mar-2000, Marc-Andre Lemburg said:

    Attached you find an update of the Unicode implementation.

    The patch is against the current CVS version. I would appreciate
    if someone with CVS checkin permissions could check the changes
    in.

    The patch contains all bugs and patches sent this week and also
    fixes a leak in the codecs code and a bug in the free list code
    for Unicode objects (which only shows up when compiling Python
    with Py_DEBUG; thanks to MarkH for spotting this one).


Index: __init__.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/encodings/__init__.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** __init__.py	2000/03/10 23:17:18	1.1
--- __init__.py	2000/03/20 16:36:27	1.2
***************
*** 31,41 ****
  
  _cache = {}
! _unkown = '--unkown--'
  
  def search_function(encoding):
      
      # Cache lookup
!     entry = _cache.get(encoding,_unkown)
!     if entry is not _unkown:
          return entry
  
--- 31,41 ----
  
  _cache = {}
! _unknown = '--unknown--'
  
  def search_function(encoding):
      
      # Cache lookup
!     entry = _cache.get(encoding,_unknown)
!     if entry is not _unknown:
          return entry