[Python-checkins] python/dist/src/Lib ConfigParser.py,1.42,1.43 SimpleHTTPServer.py,1.18,1.19 anydbm.py,1.12,1.13 bdb.py,1.40,1.41 cgi.py,1.72,1.73 cmd.py,1.29,1.30 codecs.py,1.24,1.25 copy.py,1.24,1.25 difflib.py,1.9,1.10 doctest.py,1.23,1.24 dospath.py,1.27,1.28 fnmatch.py,1.12,1.13 ftplib.py,1.70,1.71 gopherlib.py,1.11,1.12 httplib.py,1.50,1.51 ihooks.py,1.13,1.14 imaplib.py,1.47,1.48 inspect.py,1.34,1.35 linecache.py,1.9,1.10 mailbox.py,1.36,1.37 mailcap.py,1.10,1.11 mhlib.py,1.29,1.30 mimetools.py,1.25,1.26 mimetypes.py,1.21,1.22 netrc.py,1.14,1.15 ntpath.py,1.47,1.48 os.py,1.56,1.57 os2emxpath.py,1.4,1.5 pdb.py,1.52,1.53 pickle.py,1.65,1.66 posixpath.py,1.48,1.49 profile.py,1.44,1.45 pstats.py,1.23,1.24 pyclbr.py,1.23,1.24 pydoc.py,1.63,1.64 regsub.py,1.13,1.14 rexec.py,1.37,1.38 rfc822.py,1.70,1.71 sgmllib.py,1.39,1.40 site.py,1.42,1.43 smtplib.py,1.54,1.55 sre_parse.py,1.53,1.54 statcache.py,1.14,1.15 tempfile.py,1.38,1.39 toaiff.py,1.11,1.12 urllib.py,1.144,1.145 urllib2.py,1.28,1.29 user.py,1.5,1.6 warnings.py,1.14,1.15 weakref.py,1.15,1.16 webbrowser.py,1.30,1.31 xmllib.py,1.29,1.30 xmlrpclib.py,1.16,1.17 zipfile.py,1.21,1.22

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Sat, 01 Jun 2002 07:18:50 -0700


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

Modified Files:
	ConfigParser.py SimpleHTTPServer.py anydbm.py bdb.py cgi.py 
	cmd.py codecs.py copy.py difflib.py doctest.py dospath.py 
	fnmatch.py ftplib.py gopherlib.py httplib.py ihooks.py 
	imaplib.py inspect.py linecache.py mailbox.py mailcap.py 
	mhlib.py mimetools.py mimetypes.py netrc.py ntpath.py os.py 
	os2emxpath.py pdb.py pickle.py posixpath.py profile.py 
	pstats.py pyclbr.py pydoc.py regsub.py rexec.py rfc822.py 
	sgmllib.py site.py smtplib.py sre_parse.py statcache.py 
	tempfile.py toaiff.py urllib.py urllib2.py user.py warnings.py 
	weakref.py webbrowser.py xmllib.py xmlrpclib.py zipfile.py 
Log Message:
SF 563203. Replaced 'has_key()' with 'in'.

Index: ConfigParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** ConfigParser.py	1 Jun 2002 00:57:55 -0000	1.42
--- ConfigParser.py	1 Jun 2002 14:18:45 -0000	1.43
***************
*** 192,196 ****
          already exists.
          """
!         if self.__sections.has_key(section):
              raise DuplicateSectionError(section)
          self.__sections[section] = {}
--- 192,196 ----
          already exists.
          """
!         if section in self.__sections:
              raise DuplicateSectionError(section)
          self.__sections[section] = {}
***************
*** 210,214 ****
              raise NoSectionError(section)
          opts.update(self.__defaults)
!         if opts.has_key('__name__'):
              del opts['__name__']
          return opts.keys()
--- 210,214 ----
              raise NoSectionError(section)
          opts.update(self.__defaults)
!         if '__name__' in opts:
              del opts['__name__']
          return opts.keys()
***************
*** 311,315 ****
                    '0': 0, 'no': 0, 'false': 0, 'off': 0}
          v = self.get(section, option)
!         if not states.has_key(v.lower()):
              raise ValueError, 'Not a boolean: %s' % v
          return states[v.lower()]
--- 311,315 ----
                    '0': 0, 'no': 0, 'false': 0, 'off': 0}
          v = self.get(section, option)
!         if not v.lower() in states:
              raise ValueError, 'Not a boolean: %s' % v
          return states[v.lower()]
***************
*** 321,330 ****
          """Check for the existence of a given option in a given section."""
          if not section or section == "DEFAULT":
!             return self.__defaults.has_key(option)
          elif not self.has_section(section):
              return 0
          else:
              option = self.optionxform(option)
!             return self.__sections[section].has_key(option)
  
      def set(self, section, option, value):
--- 321,330 ----
          """Check for the existence of a given option in a given section."""
          if not section or section == "DEFAULT":
!             return option in self.__defaults
          elif not self.has_section(section):
              return 0
          else:
              option = self.optionxform(option)
!             return option in self.__sections[section]
  
      def set(self, section, option, value):
***************
*** 366,370 ****
                  raise NoSectionError(section)
          option = self.optionxform(option)
!         existed = sectdict.has_key(option)
          if existed:
              del sectdict[option]
--- 366,370 ----
                  raise NoSectionError(section)
          option = self.optionxform(option)
!         existed = option in sectdict
          if existed:
              del sectdict[option]
***************
*** 373,377 ****
      def remove_section(self, section):
          """Remove a file section."""
!         if self.__sections.has_key(section):
              del self.__sections[section]
              return True
--- 373,377 ----
      def remove_section(self, section):
          """Remove a file section."""
!         if section in self.__sections:
              del self.__sections[section]
              return True
***************
*** 434,438 ****
                  if mo:
                      sectname = mo.group('header')
!                     if self.__sections.has_key(sectname):
                          cursect = self.__sections[sectname]
                      elif sectname == DEFAULTSECT:
--- 434,438 ----
                  if mo:
                      sectname = mo.group('header')
!                     if sectname in self.__sections:
                          cursect = self.__sections[sectname]
                      elif sectname == DEFAULTSECT:

Index: SimpleHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/SimpleHTTPServer.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** SimpleHTTPServer.py	17 Mar 2002 18:37:22 -0000	1.18
--- SimpleHTTPServer.py	1 Jun 2002 14:18:45 -0000	1.19
***************
*** 176,183 ****
  
          base, ext = posixpath.splitext(path)
!         if self.extensions_map.has_key(ext):
              return self.extensions_map[ext]
          ext = ext.lower()
!         if self.extensions_map.has_key(ext):
              return self.extensions_map[ext]
          else:
--- 176,183 ----
  
          base, ext = posixpath.splitext(path)
!         if ext in self.extensions_map:
              return self.extensions_map[ext]
          ext = ext.lower()
!         if ext in self.extensions_map:
              return self.extensions_map[ext]
          else:

Index: anydbm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/anydbm.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** anydbm.py	18 Mar 2002 03:07:20 -0000	1.12
--- anydbm.py	1 Jun 2002 14:18:45 -0000	1.13
***************
*** 26,30 ****
          del d[key]      # delete data stored at key (raises KeyError
                          # if no such key)
!         flag = d.has_key(key)   # true if the key exists
          list = d.keys() # return a list of all existing keys (slow!)
  
--- 26,30 ----
          del d[key]      # delete data stored at key (raises KeyError
                          # if no such key)
!         flag = key in d   # true if the key exists
          list = d.keys() # return a list of all existing keys (slow!)
  

Index: bdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bdb.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** bdb.py	29 May 2002 00:54:38 -0000	1.40
--- bdb.py	1 Jun 2002 14:18:45 -0000	1.41
***************
*** 104,108 ****
      def break_here(self, frame):
          filename = self.canonic(frame.f_code.co_filename)
!         if not self.breaks.has_key(filename):
              return False
          lineno = frame.f_lineno
--- 104,108 ----
      def break_here(self, frame):
          filename = self.canonic(frame.f_code.co_filename)
!         if not filename in self.breaks:
              return False
          lineno = frame.f_lineno
***************
*** 212,216 ****
              return 'Line %s:%d does not exist' % (filename,
                                     lineno)
!         if not self.breaks.has_key(filename):
              self.breaks[filename] = []
          list = self.breaks[filename]
--- 212,216 ----
              return 'Line %s:%d does not exist' % (filename,
                                     lineno)
!         if not filename in self.breaks:
              self.breaks[filename] = []
          list = self.breaks[filename]
***************
*** 221,225 ****
      def clear_break(self, filename, lineno):
          filename = self.canonic(filename)
!         if not self.breaks.has_key(filename):
              return 'There are no breakpoints in %s' % filename
          if lineno not in self.breaks[filename]:
--- 221,225 ----
      def clear_break(self, filename, lineno):
          filename = self.canonic(filename)
!         if not filename in self.breaks:
              return 'There are no breakpoints in %s' % filename
          if lineno not in self.breaks[filename]:
***************
*** 250,254 ****
      def clear_all_file_breaks(self, filename):
          filename = self.canonic(filename)
!         if not self.breaks.has_key(filename):
              return 'There are no breakpoints in %s' % filename
          for line in self.breaks[filename]:
--- 250,254 ----
      def clear_all_file_breaks(self, filename):
          filename = self.canonic(filename)
!         if not filename in self.breaks:
              return 'There are no breakpoints in %s' % filename
          for line in self.breaks[filename]:
***************
*** 268,277 ****
      def get_break(self, filename, lineno):
          filename = self.canonic(filename)
!         return self.breaks.has_key(filename) and \
              lineno in self.breaks[filename]
  
      def get_breaks(self, filename, lineno):
          filename = self.canonic(filename)
!         return self.breaks.has_key(filename) and \
              lineno in self.breaks[filename] and \
              Breakpoint.bplist[filename, lineno] or []
--- 268,277 ----
      def get_break(self, filename, lineno):
          filename = self.canonic(filename)
!         return filename in self.breaks and \
              lineno in self.breaks[filename]
  
      def get_breaks(self, filename, lineno):
          filename = self.canonic(filename)
!         return filename in self.breaks and \
              lineno in self.breaks[filename] and \
              Breakpoint.bplist[filename, lineno] or []
***************
*** 279,283 ****
      def get_file_breaks(self, filename):
          filename = self.canonic(filename)
!         if self.breaks.has_key(filename):
              return self.breaks[filename]
          else:
--- 279,283 ----
      def get_file_breaks(self, filename):
          filename = self.canonic(filename)
!         if filename in self.breaks:
              return self.breaks[filename]
          else:
***************
*** 317,321 ****
          else:
              s = s + "<lambda>"
!         if frame.f_locals.has_key('__args__'):
              args = frame.f_locals['__args__']
          else:
--- 317,321 ----
          else:
              s = s + "<lambda>"
!         if '__args__' in frame.f_locals:
              args = frame.f_locals['__args__']
          else:
***************
*** 325,329 ****
          else:
              s = s + '()'
!         if frame.f_locals.has_key('__return__'):
              rv = frame.f_locals['__return__']
              s = s + '->'
--- 325,329 ----
          else:
              s = s + '()'
!         if '__return__' in frame.f_locals:
              rv = frame.f_locals['__return__']
              s = s + '->'

Index: cgi.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** cgi.py	31 May 2002 23:54:44 -0000	1.72
--- cgi.py	1 Jun 2002 14:18:45 -0000	1.73
***************
*** 131,135 ****
      if fp is None:
          fp = sys.stdin
!     if not environ.has_key('REQUEST_METHOD'):
          environ['REQUEST_METHOD'] = 'GET'       # For testing stand-alone
      if environ['REQUEST_METHOD'] == 'POST':
--- 131,135 ----
      if fp is None:
          fp = sys.stdin
!     if not 'REQUEST_METHOD' in environ:
          environ['REQUEST_METHOD'] = 'GET'       # For testing stand-alone
      if environ['REQUEST_METHOD'] == 'POST':
***************
*** 144,148 ****
          else:
              qs = ''                     # Unknown content-type
!         if environ.has_key('QUERY_STRING'):
              if qs: qs = qs + '&'
              qs = qs + environ['QUERY_STRING']
--- 144,148 ----
          else:
              qs = ''                     # Unknown content-type
!         if 'QUERY_STRING' in environ:
              if qs: qs = qs + '&'
              qs = qs + environ['QUERY_STRING']
***************
*** 151,155 ****
              qs = qs + sys.argv[1]
          environ['QUERY_STRING'] = qs    # XXX Shouldn't, really
!     elif environ.has_key('QUERY_STRING'):
          qs = environ['QUERY_STRING']
      else:
--- 151,155 ----
              qs = qs + sys.argv[1]
          environ['QUERY_STRING'] = qs    # XXX Shouldn't, really
!     elif 'QUERY_STRING' in environ:
          qs = environ['QUERY_STRING']
      else:
***************
*** 182,186 ****
      dict = {}
      for name, value in parse_qsl(qs, keep_blank_values, strict_parsing):
!         if dict.has_key(name):
              dict[name].append(value)
          else:
--- 182,186 ----
      dict = {}
      for name, value in parse_qsl(qs, keep_blank_values, strict_parsing):
!         if name in dict:
              dict[name].append(value)
          else:
***************
*** 245,249 ****
      """
      boundary = ""
!     if pdict.has_key('boundary'):
          boundary = pdict['boundary']
      if not valid_boundary(boundary):
--- 245,249 ----
      """
      boundary = ""
!     if 'boundary' in pdict:
          boundary = pdict['boundary']
      if not valid_boundary(boundary):
***************
*** 305,313 ****
          if key != 'form-data':
              continue
!         if params.has_key('name'):
              name = params['name']
          else:
              continue
!         if partdict.has_key(name):
              partdict[name].append(data)
          else:
--- 305,313 ----
          if key != 'form-data':
              continue
!         if 'name' in params:
              name = params['name']
          else:
              continue
!         if name in partdict:
              partdict[name].append(data)
          else:
***************
*** 441,448 ****
          self.keep_blank_values = keep_blank_values
          self.strict_parsing = strict_parsing
!         if environ.has_key('REQUEST_METHOD'):
              method = environ['REQUEST_METHOD'].upper()
          if method == 'GET' or method == 'HEAD':
!             if environ.has_key('QUERY_STRING'):
                  qs = environ['QUERY_STRING']
              elif sys.argv[1:]:
--- 441,448 ----
          self.keep_blank_values = keep_blank_values
          self.strict_parsing = strict_parsing
!         if 'REQUEST_METHOD' in environ:
              method = environ['REQUEST_METHOD'].upper()
          if method == 'GET' or method == 'HEAD':
!             if 'QUERY_STRING' in environ:
                  qs = environ['QUERY_STRING']
              elif sys.argv[1:]:
***************
*** 459,465 ****
                  # Set default content-type for POST to what's traditional
                  headers['content-type'] = "application/x-www-form-urlencoded"
!             if environ.has_key('CONTENT_TYPE'):
                  headers['content-type'] = environ['CONTENT_TYPE']
!             if environ.has_key('CONTENT_LENGTH'):
                  headers['content-length'] = environ['CONTENT_LENGTH']
          self.fp = fp or sys.stdin
--- 459,465 ----
                  # Set default content-type for POST to what's traditional
                  headers['content-type'] = "application/x-www-form-urlencoded"
!             if 'CONTENT_TYPE' in environ:
                  headers['content-type'] = environ['CONTENT_TYPE']
!             if 'CONTENT_LENGTH' in environ:
                  headers['content-length'] = environ['CONTENT_LENGTH']
          self.fp = fp or sys.stdin
***************
*** 469,481 ****
          # Process content-disposition header
          cdisp, pdict = "", {}
!         if self.headers.has_key('content-disposition'):
              cdisp, pdict = parse_header(self.headers['content-disposition'])
          self.disposition = cdisp
          self.disposition_options = pdict
          self.name = None
!         if pdict.has_key('name'):
              self.name = pdict['name']
          self.filename = None
!         if pdict.has_key('filename'):
              self.filename = pdict['filename']
  
--- 469,481 ----
          # Process content-disposition header
          cdisp, pdict = "", {}
!         if 'content-disposition' in self.headers:
              cdisp, pdict = parse_header(self.headers['content-disposition'])
          self.disposition = cdisp
          self.disposition_options = pdict
          self.name = None
!         if 'name' in pdict:
              self.name = pdict['name']
          self.filename = None
!         if 'filename' in pdict:
              self.filename = pdict['filename']
  
***************
*** 492,496 ****
          # See below for what we do if there does exist a content-type header,
          # but it happens to be something we don't understand.
!         if self.headers.has_key('content-type'):
              ctype, pdict = parse_header(self.headers['content-type'])
          elif self.outerboundary or method != 'POST':
--- 492,496 ----
          # See below for what we do if there does exist a content-type header,
          # but it happens to be something we don't understand.
!         if 'content-type' in self.headers:
              ctype, pdict = parse_header(self.headers['content-type'])
          elif self.outerboundary or method != 'POST':
***************
*** 501,508 ****
          self.type_options = pdict
          self.innerboundary = ""
!         if pdict.has_key('boundary'):
              self.innerboundary = pdict['boundary']
          clen = -1
!         if self.headers.has_key('content-length'):
              try:
                  clen = int(self.headers['content-length'])
--- 501,508 ----
          self.type_options = pdict
          self.innerboundary = ""
!         if 'boundary' in pdict:
              self.innerboundary = pdict['boundary']
          clen = -1
!         if 'content-length' in self.headers:
              try:
                  clen = int(self.headers['content-length'])
***************
*** 556,560 ****
      def getvalue(self, key, default=None):
          """Dictionary style get() method, including 'value' lookup."""
!         if self.has_key(key):
              value = self[key]
              if type(value) is type([]):
--- 556,560 ----
      def getvalue(self, key, default=None):
          """Dictionary style get() method, including 'value' lookup."""
!         if key in self:
              value = self[key]
              if type(value) is type([]):
***************
*** 567,571 ****
      def getfirst(self, key, default=None):
          """ Return the first value received."""
!         if self.has_key(key):
              value = self[key]
              if type(value) is type([]):
--- 567,571 ----
      def getfirst(self, key, default=None):
          """ Return the first value received."""
!         if key in self:
              value = self[key]
              if type(value) is type([]):
***************
*** 578,582 ****
      def getlist(self, key):
          """ Return list of received values."""
!         if self.has_key(key):
              value = self[key]
              if type(value) is type([]):
--- 578,582 ----
      def getlist(self, key):
          """ Return list of received values."""
!         if key in self:
              value = self[key]
              if type(value) is type([]):
***************
*** 604,607 ****
--- 604,615 ----
          return False
  
+     def __contains__(self, key):
+         """Dictionary style __contains__ method."""
+         if self.list is None:
+             raise TypeError, "not indexable"
+         for item in self.list:
+             if item.name == key: return True
+         return False
+ 
      def __len__(self):
          """Dictionary style len(x) support."""
***************
*** 771,775 ****
  
      form[key] -> [value, value, ...]
!     form.has_key(key) -> Boolean
      form.keys() -> [key, key, ...]
      form.values() -> [[val, val, ...], [val, val, ...], ...]
--- 779,783 ----
  
      form[key] -> [value, value, ...]
!     key in form -> Boolean
      form.keys() -> [key, key, ...]
      form.values() -> [[val, val, ...], [val, val, ...], ...]
***************
*** 848,855 ****
      """This class is present for backwards compatibility only."""
      def values(self, key):
!         if self.dict.has_key(key) :return self.dict[key]
          else: return None
      def indexed_value(self, key, location):
!         if self.dict.has_key(key):
              if len(self.dict[key]) > location:
                  return self.dict[key][location]
--- 856,863 ----
      """This class is present for backwards compatibility only."""
      def values(self, key):
!         if key in self.dict :return self.dict[key]
          else: return None
      def indexed_value(self, key, location):
!         if key in self.dict:
              if len(self.dict[key]) > location:
                  return self.dict[key][location]
***************
*** 857,866 ****
          else: return None
      def value(self, key):
!         if self.dict.has_key(key): return self.dict[key][0]
          else: return None
      def length(self, key):
          return len(self.dict[key])
      def stripped(self, key):
!         if self.dict.has_key(key): return self.dict[key][0].strip()
          else: return None
      def pars(self):
--- 865,874 ----
          else: return None
      def value(self, key):
!         if key in self.dict: return self.dict[key][0]
          else: return None
      def length(self, key):
          return len(self.dict[key])
      def stripped(self, key):
!         if key in self.dict: return self.dict[key][0].strip()
          else: return None
      def pars(self):

Index: cmd.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cmd.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** cmd.py	29 May 2002 16:18:41 -0000	1.29
--- cmd.py	1 Jun 2002 14:18:45 -0000	1.30
***************
*** 305,309 ****
                      prevname = name
                      cmd=name[3:]
!                     if help.has_key(cmd):
                          cmds_doc.append(cmd)
                          del help[cmd]
--- 305,309 ----
                      prevname = name
                      cmd=name[3:]
!                     if cmd in help:
                          cmds_doc.append(cmd)
                          del help[cmd]

Index: codecs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/codecs.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** codecs.py	5 Mar 2002 15:46:38 -0000	1.24
--- codecs.py	1 Jun 2002 14:18:45 -0000	1.25
***************
*** 612,616 ****
      m = {}
      for k,v in decoding_map.items():
!         if not m.has_key(v):
              m[v] = k
          else:
--- 612,616 ----
      m = {}
      for k,v in decoding_map.items():
!         if not v in m:
              m[v] = k
          else:

Index: copy.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/copy.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** copy.py	28 Feb 2002 23:19:13 -0000	1.24
--- copy.py	1 Jun 2002 14:18:45 -0000	1.25
***************
*** 159,163 ****
          memo = {}
      d = id(x)
!     if memo.has_key(d):
          return memo[d]
      try:
--- 159,163 ----
          memo = {}
      d = id(x)
!     if d in memo:
          return memo[d]
      try:

Index: difflib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/difflib.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** difflib.py	29 Apr 2002 01:37:32 -0000	1.9
--- difflib.py	1 Jun 2002 14:18:45 -0000	1.10
***************
*** 322,326 ****
                          del d[elt]
  
!         # Now for x in b, isjunk(x) == junkdict.has_key(x), but the
          # latter is much faster.  Note too that while there may be a
          # lot of junk in the sequence, the number of *unique* junk
--- 322,326 ----
                          del d[elt]
  
!         # Now for x in b, isjunk(x) == x in junkdict, but the
          # latter is much faster.  Note too that while there may be a
          # lot of junk in the sequence, the number of *unique* junk

Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** doctest.py	3 Apr 2002 22:41:50 -0000	1.23
--- doctest.py	1 Jun 2002 14:18:45 -0000	1.24
***************
*** 1016,1020 ****
          d = self.name2ft
          for name, (f, t) in other.name2ft.items():
!             if d.has_key(name):
                  print "*** Tester.merge: '" + name + "' in both" \
                      " testers; summing outcomes."
--- 1016,1020 ----
          d = self.name2ft
          for name, (f, t) in other.name2ft.items():
!             if name in d:
                  print "*** Tester.merge: '" + name + "' in both" \
                      " testers; summing outcomes."
***************
*** 1025,1029 ****
  
      def __record_outcome(self, name, f, t):
!         if self.name2ft.has_key(name):
              print "*** Warning: '" + name + "' was tested before;", \
                  "summing outcomes."
--- 1025,1029 ----
  
      def __record_outcome(self, name, f, t):
!         if name in self.name2ft:
              print "*** Warning: '" + name + "' was tested before;", \
                  "summing outcomes."

Index: dospath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** dospath.py	7 Apr 2002 06:36:22 -0000	1.27
--- dospath.py	1 Jun 2002 14:18:45 -0000	1.28
***************
*** 227,231 ****
          i = i+1
      if i == 1:
!         if not os.environ.has_key('HOME'):
              return path
          userhome = os.environ['HOME']
--- 227,231 ----
          i = i+1
      if i == 1:
!         if not 'HOME' in os.environ:
              return path
          userhome = os.environ['HOME']
***************
*** 273,277 ****
                      index = path.index('}')
                      var = path[:index]
!                     if os.environ.has_key(var):
                          res = res + os.environ[var]
                  except ValueError:
--- 273,277 ----
                      index = path.index('}')
                      var = path[:index]
!                     if var in os.environ:
                          res = res + os.environ[var]
                  except ValueError:
***************
*** 286,290 ****
                      index = index + 1
                      c = path[index:index + 1]
!                 if os.environ.has_key(var):
                      res = res + os.environ[var]
                  if c != '':
--- 286,290 ----
                      index = index + 1
                      c = path[index:index + 1]
!                 if var in os.environ:
                      res = res + os.environ[var]
                  if c != '':

Index: fnmatch.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/fnmatch.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** fnmatch.py	6 Jun 2001 06:24:38 -0000	1.12
--- fnmatch.py	1 Jun 2002 14:18:45 -0000	1.13
***************
*** 43,47 ****
      result=[]
      pat=os.path.normcase(pat)
!     if not _cache.has_key(pat):
          res = translate(pat)
          _cache[pat] = re.compile(res)
--- 43,47 ----
      result=[]
      pat=os.path.normcase(pat)
!     if not pat in _cache:
          res = translate(pat)
          _cache[pat] = re.compile(res)
***************
*** 65,69 ****
      """
  
!     if not _cache.has_key(pat):
          res = translate(pat)
          _cache[pat] = re.compile(res)
--- 65,69 ----
      """
  
!     if not pat in _cache:
          res = translate(pat)
          _cache[pat] = re.compile(res)

Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** ftplib.py	1 Jun 2002 01:29:16 -0000	1.70
--- ftplib.py	1 Jun 2002 14:18:45 -0000	1.71
***************
*** 661,665 ****
      def __init__(self, filename=None):
          if filename is None:
!             if os.environ.has_key("HOME"):
                  filename = os.path.join(os.environ["HOME"],
                                          ".netrc")
--- 661,665 ----
      def __init__(self, filename=None):
          if filename is None:
!             if "HOME" in os.environ:
                  filename = os.path.join(os.environ["HOME"],
                                          ".netrc")
***************
*** 715,719 ****
                  self.__defacct = acct or self.__defacct
              if host:
!                 if self.__hosts.has_key(host):
                      ouser, opasswd, oacct = \
                             self.__hosts[host]
--- 715,719 ----
                  self.__defacct = acct or self.__defacct
              if host:
!                 if host in self.__hosts:
                      ouser, opasswd, oacct = \
                             self.__hosts[host]
***************
*** 737,741 ****
          host = host.lower()
          user = passwd = acct = None
!         if self.__hosts.has_key(host):
              user, passwd, acct = self.__hosts[host]
          user = user or self.__defuser
--- 737,741 ----
          host = host.lower()
          user = passwd = acct = None
!         if host in self.__hosts:
              user, passwd, acct = self.__hosts[host]
          user = user or self.__defuser

Index: gopherlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/gopherlib.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** gopherlib.py	16 Feb 2002 23:06:16 -0000	1.11
--- gopherlib.py	1 Jun 2002 14:18:45 -0000	1.12
***************
*** 46,50 ****
              if name[:2] == 'A_':
                  _type_to_name_map[eval(name)] = name[2:]
!     if _type_to_name_map.has_key(gtype):
          return _type_to_name_map[gtype]
      return 'TYPE=' + `gtype`
--- 46,50 ----
              if name[:2] == 'A_':
                  _type_to_name_map[eval(name)] = name[2:]
!     if gtype in _type_to_name_map:
          return _type_to_name_map[gtype]
      return 'TYPE=' + `gtype`

Index: httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** httplib.py	20 Apr 2002 07:47:39 -0000	1.50
--- httplib.py	1 Jun 2002 14:18:45 -0000	1.51
***************
*** 550,554 ****
          # optional skip_host argument to putrequest().  The check is
          # harder because field names are case insensitive.
!         if (headers.has_key('Host')
              or [k for k in headers.iterkeys() if k.lower() == "host"]):
              self.putrequest(method, url, skip_host=1)
--- 550,554 ----
          # optional skip_host argument to putrequest().  The check is
          # harder because field names are case insensitive.
!         if 'Host' in (headers
              or [k for k in headers.iterkeys() if k.lower() == "host"]):
              self.putrequest(method, url, skip_host=1)

Index: ihooks.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ihooks.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** ihooks.py	9 Feb 2001 10:17:30 -0000	1.13
--- ihooks.py	1 Jun 2002 14:18:45 -0000	1.14
***************
*** 176,180 ****
      def add_module(self, name):
          d = self.modules_dict()
!         if d.has_key(name): return d[name]
          d[name] = m = self.new_module(name)
          return m
--- 176,180 ----
      def add_module(self, name):
          d = self.modules_dict()
!         if name in d: return d[name]
          d[name] = m = self.new_module(name)
          return m
***************
*** 353,357 ****
  
      def import_module(self, name, globals={}, locals={}, fromlist=[]):
!         if self.modules.has_key(name):
              return self.modules[name] # Fast path
          stuff = self.loader.find_module(name)
--- 353,357 ----
  
      def import_module(self, name, globals={}, locals={}, fromlist=[]):
!         if name in self.modules:
              return self.modules[name] # Fast path
          stuff = self.loader.find_module(name)
***************
*** 404,411 ****
  
      def determine_parent(self, globals):
!         if not globals or not globals.has_key("__name__"):
              return None
          pname = globals['__name__']
!         if globals.has_key("__path__"):
              parent = self.modules[pname]
              assert globals is parent.__dict__
--- 404,411 ----
  
      def determine_parent(self, globals):
!         if not globals or not "__name__" in globals:
              return None
          pname = globals['__name__']
!         if "__path__" in globals:
              parent = self.modules[pname]
              assert globals is parent.__dict__

Index: imaplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imaplib.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** imaplib.py	1 Jun 2002 03:06:31 -0000	1.47
--- imaplib.py	1 Jun 2002 14:18:45 -0000	1.48
***************
*** 169,175 ****
  
          self.welcome = self._get_response()
!         if self.untagged_responses.has_key('PREAUTH'):
              self.state = 'AUTH'
!         elif self.untagged_responses.has_key('OK'):
              self.state = 'NONAUTH'
          else:
--- 169,175 ----
  
          self.welcome = self._get_response()
!         if 'PREAUTH' in self.untagged_responses:
              self.state = 'AUTH'
!         elif 'OK' in self.untagged_responses:
              self.state = 'NONAUTH'
          else:
***************
*** 178,182 ****
          cap = 'CAPABILITY'
          self._simple_command(cap)
!         if not self.untagged_responses.has_key(cap):
              raise self.error('no CAPABILITY response from server')
          self.capabilities = tuple(self.untagged_responses[cap][-1].upper().split())
--- 178,182 ----
          cap = 'CAPABILITY'
          self._simple_command(cap)
!         if not cap in self.untagged_responses:
              raise self.error('no CAPABILITY response from server')
          self.capabilities = tuple(self.untagged_responses[cap][-1].upper().split())
***************
*** 197,201 ****
      def __getattr__(self, attr):
          #       Allow UPPERCASE variants of IMAP4 command methods.
!         if Commands.has_key(attr):
              return getattr(self, attr.lower())
          raise AttributeError("Unknown IMAP4 command: '%s'" % attr)
--- 197,201 ----
      def __getattr__(self, attr):
          #       Allow UPPERCASE variants of IMAP4 command methods.
!         if attr in Commands:
              return getattr(self, attr.lower())
          raise AttributeError("Unknown IMAP4 command: '%s'" % attr)
***************
*** 455,459 ****
          except: typ, dat = 'NO', ['%s: %s' % sys.exc_info()[:2]]
          self.shutdown()
!         if self.untagged_responses.has_key('BYE'):
              return 'BYE', self.untagged_responses['BYE']
          return typ, dat
--- 455,459 ----
          except: typ, dat = 'NO', ['%s: %s' % sys.exc_info()[:2]]
          self.shutdown()
!         if 'BYE' in self.untagged_responses:
              return 'BYE', self.untagged_responses['BYE']
          return typ, dat
***************
*** 549,553 ****
              return typ, dat
          self.state = 'SELECTED'
!         if self.untagged_responses.has_key('READ-ONLY') \
                  and not readonly:
              if __debug__:
--- 549,553 ----
              return typ, dat
          self.state = 'SELECTED'
!         if 'READ-ONLY' in self.untagged_responses \
                  and not readonly:
              if __debug__:
***************
*** 620,624 ****
          """
          command = command.upper()
!         if not Commands.has_key(command):
              raise self.error("Unknown IMAP4 UID command: %s" % command)
          if self.state not in Commands[command]:
--- 620,624 ----
          """
          command = command.upper()
!         if not command in Commands:
              raise self.error("Unknown IMAP4 UID command: %s" % command)
          if self.state not in Commands[command]:
***************
*** 655,659 ****
          #if not name in self.capabilities:      # Let the server decide!
          #    raise self.error('unknown extension command: %s' % name)
!         if not Commands.has_key(name):
              Commands[name] = (self.state,)
          return apply(self._simple_command, (name,) + args)
--- 655,659 ----
          #if not name in self.capabilities:      # Let the server decide!
          #    raise self.error('unknown extension command: %s' % name)
!         if not name in Commands:
              Commands[name] = (self.state,)
          return apply(self._simple_command, (name,) + args)
***************
*** 672,676 ****
                  self._mesg('untagged_responses[%s] %s += ["%s"]' %
                          (typ, len(ur.get(typ,'')), dat))
!         if ur.has_key(typ):
              ur[typ].append(dat)
          else:
--- 672,676 ----
                  self._mesg('untagged_responses[%s] %s += ["%s"]' %
                          (typ, len(ur.get(typ,'')), dat))
!         if typ in ur:
              ur[typ].append(dat)
          else:
***************
*** 692,699 ****
  
          for typ in ('OK', 'NO', 'BAD'):
!             if self.untagged_responses.has_key(typ):
                  del self.untagged_responses[typ]
  
!         if self.untagged_responses.has_key('READ-ONLY') \
          and not self.is_readonly:
              raise self.readonly('mailbox status changed to READ-ONLY')
--- 692,699 ----
  
          for typ in ('OK', 'NO', 'BAD'):
!             if typ in self.untagged_responses:
                  del self.untagged_responses[typ]
  
!         if 'READ-ONLY' in self.untagged_responses \
          and not self.is_readonly:
              raise self.readonly('mailbox status changed to READ-ONLY')
***************
*** 783,787 ****
          if self._match(self.tagre, resp):
              tag = self.mo.group('tag')
!             if not self.tagged_commands.has_key(tag):
                  raise self.abort('unexpected tagged response: %s' % resp)
  
--- 783,787 ----
          if self._match(self.tagre, resp):
              tag = self.mo.group('tag')
!             if not tag in self.tagged_commands:
                  raise self.abort('unexpected tagged response: %s' % resp)
  
***************
*** 936,940 ****
          if typ == 'NO':
              return typ, dat
!         if not self.untagged_responses.has_key(name):
              return typ, [None]
          data = self.untagged_responses[name]
--- 936,940 ----
          if typ == 'NO':
              return typ, dat
!         if not name in self.untagged_responses:
              return typ, [None]
          data = self.untagged_responses[name]

Index: inspect.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/inspect.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** inspect.py	1 Jun 2002 03:06:31 -0000	1.34
--- inspect.py	1 Jun 2002 14:18:45 -0000	1.35
***************
*** 357,366 ****
      except TypeError:
          return None
!     if modulesbyfile.has_key(file):
          return sys.modules[modulesbyfile[file]]
      for module in sys.modules.values():
          if hasattr(module, '__file__'):
              modulesbyfile[getabsfile(module)] = module.__name__
!     if modulesbyfile.has_key(file):
          return sys.modules[modulesbyfile[file]]
      main = sys.modules['__main__']
--- 357,366 ----
      except TypeError:
          return None
!     if file in modulesbyfile:
          return sys.modules[modulesbyfile[file]]
      for module in sys.modules.values():
          if hasattr(module, '__file__'):
              modulesbyfile[getabsfile(module)] = module.__name__
!     if file in modulesbyfile:
          return sys.modules[modulesbyfile[file]]
      main = sys.modules['__main__']
***************
*** 530,534 ****
      for c in classes:
          results.append((c, c.__bases__))
!         if children.has_key(c):
              results.append(walktree(children[c], children, c))
      return results
--- 530,534 ----
      for c in classes:
          results.append((c, c.__bases__))
!         if c in children:
              results.append(walktree(children[c], children, c))
      return results
***************
*** 548,552 ****
          if c.__bases__:
              for parent in c.__bases__:
!                 if not children.has_key(parent):
                      children[parent] = []
                  children[parent].append(c)
--- 548,552 ----
          if c.__bases__:
              for parent in c.__bases__:
!                 if not parent in children:
                      children[parent] = []
                  children[parent].append(c)

Index: linecache.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/linecache.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** linecache.py	14 Apr 2002 20:12:39 -0000	1.9
--- linecache.py	1 Jun 2002 14:18:45 -0000	1.10
***************
*** 36,40 ****
      Update the cache if it doesn't contain an entry for this file already."""
  
!     if cache.has_key(filename):
          return cache[filename][2]
      else:
--- 36,40 ----
      Update the cache if it doesn't contain an entry for this file already."""
  
!     if filename in cache:
          return cache[filename][2]
      else:
***************
*** 62,66 ****
      and return an empty list."""
  
!     if cache.has_key(filename):
          del cache[filename]
      if not filename or filename[0] + filename[-1] == '<>':
--- 62,66 ----
      and return an empty list."""
  
!     if filename in cache:
          del cache[filename]
      if not filename or filename[0] + filename[-1] == '<>':

Index: mailbox.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mailbox.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** mailbox.py	4 Apr 2002 22:55:58 -0000	1.36
--- mailbox.py	1 Jun 2002 14:18:45 -0000	1.37
***************
*** 266,270 ****
      if not args:
          for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER':
!             if os.environ.has_key(key):
                  mbox = os.environ[key]
                  break
--- 266,270 ----
      if not args:
          for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER':
!             if key in os.environ:
                  mbox = os.environ[key]
                  break

Index: mailcap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mailcap.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** mailcap.py	11 May 2001 18:47:54 -0000	1.10
--- mailcap.py	1 Jun 2002 14:18:46 -0000	1.11
***************
*** 26,30 ****
          fp.close()
          for key in morecaps.keys():
!             if not caps.has_key(key):
                  caps[key] = morecaps[key]
              else:
--- 26,30 ----
          fp.close()
          for key in morecaps.keys():
!             if not key in caps:
                  caps[key] = morecaps[key]
              else:
***************
*** 35,43 ****
      """Return a list of all mailcap files found on the system."""
      # XXX Actually, this is Unix-specific
!     if os.environ.has_key('MAILCAPS'):
          str = os.environ['MAILCAPS']
          mailcaps = str.split(':')
      else:
!         if os.environ.has_key('HOME'):
              home = os.environ['HOME']
          else:
--- 35,43 ----
      """Return a list of all mailcap files found on the system."""
      # XXX Actually, this is Unix-specific
!     if 'MAILCAPS' in os.environ:
          str = os.environ['MAILCAPS']
          mailcaps = str.split(':')
      else:
!         if 'HOME' in os.environ:
              home = os.environ['HOME']
          else:
***************
*** 83,87 ****
          key = '/'.join(types).lower()
          # Update the database
!         if caps.has_key(key):
              caps[key].append(fields)
          else:
--- 83,87 ----
          key = '/'.join(types).lower()
          # Update the database
!         if key in caps:
              caps[key].append(fields)
          else:
***************
*** 113,117 ****
              fkey = field[:i].strip()
              fvalue = field[i+1:].strip()
!         if fields.has_key(fkey):
              # Ignore it
              pass
--- 113,117 ----
              fkey = field[:i].strip()
              fvalue = field[i+1:].strip()
!         if fkey in fields:
              # Ignore it
              pass
***************
*** 148,152 ****
      # XXX This code should somehow check for the needsterminal flag.
      for e in entries:
!         if e.has_key('test'):
              test = subst(e['test'], filename, plist)
              if test and os.system(test) != 0:
--- 148,152 ----
      # XXX This code should somehow check for the needsterminal flag.
      for e in entries:
!         if 'test' in e:
              test = subst(e['test'], filename, plist)
              if test and os.system(test) != 0:
***************
*** 158,169 ****
  def lookup(caps, MIMEtype, key=None):
      entries = []
!     if caps.has_key(MIMEtype):
          entries = entries + caps[MIMEtype]
      MIMEtypes = MIMEtype.split('/')
      MIMEtype = MIMEtypes[0] + '/*'
!     if caps.has_key(MIMEtype):
          entries = entries + caps[MIMEtype]
      if key is not None:
!         entries = filter(lambda e, key=key: e.has_key(key), entries)
      return entries
  
--- 158,169 ----
  def lookup(caps, MIMEtype, key=None):
      entries = []
!     if MIMEtype in caps:
          entries = entries + caps[MIMEtype]
      MIMEtypes = MIMEtype.split('/')
      MIMEtype = MIMEtypes[0] + '/*'
!     if MIMEtype in caps:
          entries = entries + caps[MIMEtype]
      if key is not None:
!         entries = filter(lambda e, key=key: key in e, entries)
      return entries
  

Index: mhlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mhlib.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** mhlib.py	4 Apr 2002 22:55:58 -0000	1.29
--- mhlib.py	1 Jun 2002 14:18:46 -0000	1.30
***************
*** 376,380 ****
              except Error, msg:
                  seqs = self.getsequences()
!                 if not seqs.has_key(head):
                      if not msg:
                          msg = "bad message list %s" % seq
--- 376,380 ----
              except Error, msg:
                  seqs = self.getsequences()
!                 if not head in seqs:
                      if not msg:
                          msg = "bad message list %s" % seq
***************
*** 413,417 ****
          except Error, msg:
              seqs = self.getsequences()
!             if not seqs.has_key(seq):
                  if not msg:
                      msg = "bad message list %s" % seq
--- 413,417 ----
          except Error, msg:
              seqs = self.getsequences()
!             if not seq in seqs:
                  if not msg:
                      msg = "bad message list %s" % seq

Index: mimetools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mimetools.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** mimetools.py	26 Mar 2002 16:21:52 -0000	1.25
--- mimetools.py	1 Jun 2002 14:18:46 -0000	1.26
***************
*** 143,147 ****
      if encoding in ('7bit', '8bit'):
          return output.write(input.read())
!     if decodetab.has_key(encoding):
          pipethrough(input, decodetab[encoding], output)
      else:
--- 143,147 ----
      if encoding in ('7bit', '8bit'):
          return output.write(input.read())
!     if encoding in decodetab:
          pipethrough(input, decodetab[encoding], output)
      else:
***************
*** 162,166 ****
      if encoding in ('7bit', '8bit'):
          return output.write(input.read())
!     if encodetab.has_key(encoding):
          pipethrough(input, encodetab[encoding], output)
      else:
--- 162,166 ----
      if encoding in ('7bit', '8bit'):
          return output.write(input.read())
!     if encoding in encodetab:
          pipethrough(input, encodetab[encoding], output)
      else:

Index: mimetypes.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mimetypes.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** mimetypes.py	5 Dec 2001 15:58:29 -0000	1.21
--- mimetypes.py	1 Jun 2002 14:18:46 -0000	1.22
***************
*** 97,103 ****
              return type, None           # never compressed, so encoding is None
          base, ext = posixpath.splitext(url)
!         while self.suffix_map.has_key(ext):
              base, ext = posixpath.splitext(base + self.suffix_map[ext])
!         if self.encodings_map.has_key(ext):
              encoding = self.encodings_map[ext]
              base, ext = posixpath.splitext(base)
--- 97,103 ----
              return type, None           # never compressed, so encoding is None
          base, ext = posixpath.splitext(url)
!         while ext in self.suffix_map:
              base, ext = posixpath.splitext(base + self.suffix_map[ext])
!         if ext in self.encodings_map:
              encoding = self.encodings_map[ext]
              base, ext = posixpath.splitext(base)
***************
*** 106,118 ****
          types_map = self.types_map
          common_types = self.common_types
!         if types_map.has_key(ext):
              return types_map[ext], encoding
!         elif types_map.has_key(ext.lower()):
              return types_map[ext.lower()], encoding
          elif strict:
              return None, encoding
!         elif common_types.has_key(ext):
              return common_types[ext], encoding
!         elif common_types.has_key(ext.lower()):
              return common_types[ext.lower()], encoding
          else:
--- 106,118 ----
          types_map = self.types_map
          common_types = self.common_types
!         if ext in types_map:
              return types_map[ext], encoding
!         elif ext.lower() in types_map:
              return types_map[ext.lower()], encoding
          elif strict:
              return None, encoding
!         elif ext in common_types:
              return common_types[ext], encoding
!         elif ext.lower() in common_types:
              return common_types[ext.lower()], encoding
          else:

Index: netrc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/netrc.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** netrc.py	22 Mar 2002 02:46:41 -0000	1.14
--- netrc.py	1 Jun 2002 14:18:46 -0000	1.15
***************
*** 85,91 ****
      def authenticators(self, host):
          """Return a (user, account, password) tuple for given host."""
!         if self.hosts.has_key(host):
              return self.hosts[host]
!         elif self.hosts.has_key('default'):
              return self.hosts['default']
          else:
--- 85,91 ----
      def authenticators(self, host):
          """Return a (user, account, password) tuple for given host."""
!         if host in self.hosts:
              return self.hosts[host]
!         elif 'default' in self.hosts:
              return self.hosts['default']
          else:

Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** ntpath.py	7 Apr 2002 06:36:23 -0000	1.47
--- ntpath.py	1 Jun 2002 14:18:46 -0000	1.48
***************
*** 344,350 ****
          i = i + 1
      if i == 1:
!         if os.environ.has_key('HOME'):
              userhome = os.environ['HOME']
!         elif not os.environ.has_key('HOMEPATH'):
              return path
          else:
--- 344,350 ----
          i = i + 1
      if i == 1:
!         if 'HOME' in os.environ:
              userhome = os.environ['HOME']
!         elif not 'HOMEPATH' in os.environ:
              return path
          else:
***************
*** 400,404 ****
                      index = path.index('}')
                      var = path[:index]
!                     if os.environ.has_key(var):
                          res = res + os.environ[var]
                  except ValueError:
--- 400,404 ----
                      index = path.index('}')
                      var = path[:index]
!                     if var in os.environ:
                          res = res + os.environ[var]
                  except ValueError:
***************
*** 413,417 ****
                      index = index + 1
                      c = path[index:index + 1]
!                 if os.environ.has_key(var):
                      res = res + os.environ[var]
                  if c != '':
--- 413,417 ----
                      index = index + 1
                      c = path[index:index + 1]
!                 if var in os.environ:
                      res = res + os.environ[var]
                  if c != '':

Index: os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** os.py	2 May 2002 17:39:19 -0000	1.56
--- os.py	1 Jun 2002 14:18:46 -0000	1.57
***************
*** 334,338 ****
          apply(func, (file,) + argrest)
          return
!     if env.has_key('PATH'):
          envpath = env['PATH']
      else:
--- 334,338 ----
          apply(func, (file,) + argrest)
          return
!     if 'PATH' in env:
          envpath = env['PATH']
      else:
***************
*** 407,411 ****
                      del self.data[key.upper()]
              def has_key(self, key):
!                 return self.data.has_key(key.upper())
              def get(self, key, failobj=None):
                  return self.data.get(key.upper(), failobj)
--- 407,413 ----
                      del self.data[key.upper()]
              def has_key(self, key):
!                 return key.upper() in self.data
!             def __contains__(self, key):
!                 return key.upper() in self.data
              def get(self, key, failobj=None):
                  return self.data.get(key.upper(), failobj)

Index: os2emxpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os2emxpath.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** os2emxpath.py	16 Apr 2002 01:38:39 -0000	1.4
--- os2emxpath.py	1 Jun 2002 14:18:46 -0000	1.5
***************
*** 292,298 ****
          i = i + 1
      if i == 1:
!         if os.environ.has_key('HOME'):
              userhome = os.environ['HOME']
!         elif not os.environ.has_key('HOMEPATH'):
              return path
          else:
--- 292,298 ----
          i = i + 1
      if i == 1:
!         if 'HOME' in os.environ:
              userhome = os.environ['HOME']
!         elif not 'HOMEPATH' in os.environ:
              return path
          else:
***************
*** 348,352 ****
                      index = path.index('}')
                      var = path[:index]
!                     if os.environ.has_key(var):
                          res = res + os.environ[var]
                  except ValueError:
--- 348,352 ----
                      index = path.index('}')
                      var = path[:index]
!                     if var in os.environ:
                          res = res + os.environ[var]
                  except ValueError:
***************
*** 361,365 ****
                      index = index + 1
                      c = path[index:index + 1]
!                 if os.environ.has_key(var):
                      res = res + os.environ[var]
                  if c != '':
--- 361,365 ----
                      index = index + 1
                      c = path[index:index + 1]
!                 if var in os.environ:
                      res = res + os.environ[var]
                  if c != '':

Index: pdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pdb.py,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** pdb.py	15 Apr 2002 00:48:24 -0000	1.52
--- pdb.py	1 Jun 2002 14:18:46 -0000	1.53
***************
*** 59,63 ****
          # Read $HOME/.pdbrc and ./.pdbrc
          self.rcLines = []
!         if os.environ.has_key('HOME'):
              envHome = os.environ['HOME']
              try:
--- 59,63 ----
          # Read $HOME/.pdbrc and ./.pdbrc
          self.rcLines = []
!         if 'HOME' in os.environ:
              envHome = os.environ['HOME']
              try:
***************
*** 155,159 ****
              return line
          args = line.split()
!         while self.aliases.has_key(args[0]):
              line = self.aliases[args[0]]
              ii = 1
--- 155,159 ----
              return line
          args = line.split()
!         while args[0] in self.aliases:
              line = self.aliases[args[0]]
              ii = 1
***************
*** 510,519 ****
              name = co.co_varnames[i]
              print name, '=',
!             if dict.has_key(name): print dict[name]
              else: print "*** undefined ***"
      do_a = do_args
  
      def do_retval(self, arg):
!         if self.curframe.f_locals.has_key('__return__'):
              print self.curframe.f_locals['__return__']
          else:
--- 510,519 ----
              name = co.co_varnames[i]
              print name, '=',
!             if name in dict: print dict[name]
              else: print "*** undefined ***"
      do_a = do_args
  
      def do_retval(self, arg):
!         if '__return__' in self.curframe.f_locals:
              print self.curframe.f_locals['__return__']
          else:
***************
*** 615,619 ****
                  print "%s = %s" % (alias, self.aliases[alias])
              return
!         if self.aliases.has_key(args[0]) and len (args) == 1:
              print "%s = %s" % (args[0], self.aliases[args[0]])
          else:
--- 615,619 ----
                  print "%s = %s" % (alias, self.aliases[alias])
              return
!         if args[0] in self.aliases and len (args) == 1:
              print "%s = %s" % (args[0], self.aliases[args[0]])
          else:
***************
*** 623,627 ****
          args = arg.split()
          if len(args) == 0: return
!         if self.aliases.has_key(args[0]):
              del self.aliases[args[0]]
  
--- 623,627 ----
          args = arg.split()
          if len(args) == 0: return
!         if args[0] in self.aliases:
              del self.aliases[args[0]]
  

Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** pickle.py	30 May 2002 12:12:04 -0000	1.65
--- pickle.py	1 Jun 2002 14:18:46 -0000	1.66
***************
*** 207,211 ****
              return
  
!         if memo.has_key(d):
              self.write(self.get(memo[d][0]))
              return
--- 207,211 ----
              return
  
!         if d in memo:
              self.write(self.get(memo[d][0]))
              return
***************
*** 431,435 ****
              save(element)
  
!         if len(object) and memo.has_key(d):
              if self.bin:
                  write(POP_MARK + self.get(memo[d][0]))
--- 431,435 ----
              save(element)
  
!         if len(object) and d in memo:
              if self.bin:
                  write(POP_MARK + self.get(memo[d][0]))
***************
*** 621,625 ****
      If the class cannot be found, return __main__.
      """
!     if classmap.has_key(cls):
          return classmap[cls]
  
--- 621,625 ----
      If the class cannot be found, return __main__.
      """
!     if cls in classmap:
          return classmap[cls]
  
***************
*** 914,918 ****
  
          if type(callable) is not ClassType:
!             if not safe_constructors.has_key(callable):
                  try:
                      safe = callable.__safe_for_unpickling__
--- 914,918 ----
  
          if type(callable) is not ClassType:
!             if not callable in safe_constructors:
                  try:
                      safe = callable.__safe_for_unpickling__

Index: posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** posixpath.py	7 Apr 2002 06:36:23 -0000	1.48
--- posixpath.py	1 Jun 2002 14:18:46 -0000	1.49
***************
*** 306,310 ****
          i = i + 1
      if i == 1:
!         if not os.environ.has_key('HOME'):
              return path
          userhome = os.environ['HOME']
--- 306,310 ----
          i = i + 1
      if i == 1:
!         if not 'HOME' in os.environ:
              return path
          userhome = os.environ['HOME']
***************
*** 344,348 ****
          if name[:1] == '{' and name[-1:] == '}':
              name = name[1:-1]
!         if os.environ.has_key(name):
              tail = path[j:]
              path = path[:i] + os.environ[name]
--- 344,348 ----
          if name[:1] == '{' and name[-1:] == '}':
              name = name[1:-1]
!         if name in os.environ:
              tail = path[j:]
              path = path[:i] + os.environ[name]

Index: profile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/profile.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** profile.py	5 Dec 2001 22:27:47 -0000	1.44
--- profile.py	1 Jun 2002 14:18:46 -0000	1.45
***************
*** 269,273 ****
          self.cur = (t, 0, 0, fn, frame, self.cur)
          timings = self.timings
!         if timings.has_key(fn):
              cc, ns, tt, ct, callers = timings[fn]
              timings[fn] = cc, ns + 1, tt, ct, callers
--- 269,273 ----
          self.cur = (t, 0, 0, fn, frame, self.cur)
          timings = self.timings
!         if fn in timings:
              cc, ns, tt, ct, callers = timings[fn]
              timings[fn] = cc, ns + 1, tt, ct, callers
***************
*** 301,305 ****
              cc = cc + 1
  
!         if callers.has_key(pfn):
              callers[pfn] = callers[pfn] + 1  # hack: gather more
              # stats such as the amount of time added to ct courtesy
--- 301,305 ----
              cc = cc + 1
  
!         if pfn in callers:
              callers[pfn] = callers[pfn] + 1  # hack: gather more
              # stats such as the amount of time added to ct courtesy

Index: pstats.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pstats.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** pstats.py	8 Oct 2001 06:28:18 -0000	1.23
--- pstats.py	1 Jun 2002 14:18:46 -0000	1.24
***************
*** 152,156 ****
  
          for func in other.stats.keys():
!             if self.stats.has_key(func):
                  old_func_stat = self.stats[func]
              else:
--- 152,156 ----
  
          for func in other.stats.keys():
!             if func in self.stats:
                  old_func_stat = self.stats[func]
              else:
***************
*** 184,188 ****
                      if not fragment:
                          break
!                     if dict.has_key(fragment):
                          bad_list[fragment] = 0
                          break
--- 184,188 ----
                      if not fragment:
                          break
!                     if fragment in dict:
                          bad_list[fragment] = 0
                          break
***************
*** 244,248 ****
                  newcallers[func_strip_path(func2)] = callers[func2]
  
!             if newstats.has_key(newfunc):
                  newstats[newfunc] = add_func_stats(
                                          newstats[newfunc],
--- 244,248 ----
                  newcallers[func_strip_path(func2)] = callers[func2]
  
!             if newfunc in newstats:
                  newstats[newfunc] = add_func_stats(
                                          newstats[newfunc],
***************
*** 265,273 ****
          self.all_callees = all_callees = {}
          for func in self.stats.keys():
!             if not all_callees.has_key(func):
                  all_callees[func] = {}
              cc, nc, tt, ct, callers = self.stats[func]
              for func2 in callers.keys():
!                 if not all_callees.has_key(func2):
                      all_callees[func2] = {}
                  all_callees[func2][func]  = callers[func2]
--- 265,273 ----
          self.all_callees = all_callees = {}
          for func in self.stats.keys():
!             if not func in all_callees:
                  all_callees[func] = {}
              cc, nc, tt, ct, callers = self.stats[func]
              for func2 in callers.keys():
!                 if not func2 in all_callees:
                      all_callees[func2] = {}
                  all_callees[func2][func]  = callers[func2]
***************
*** 355,359 ****
              self.print_call_heading(width, "called...")
              for func in list:
!                 if self.all_callees.has_key(func):
                      self.print_call_line(width, func, self.all_callees[func])
                  else:
--- 355,359 ----
              self.print_call_heading(width, "called...")
              for func in list:
!                 if func in self.all_callees:
                      self.print_call_line(width, func, self.all_callees[func])
                  else:
***************
*** 472,476 ****
          new_callers[func] = target[func]
      for func in source.keys():
!         if new_callers.has_key(func):
              new_callers[func] = source[func] + new_callers[func]
          else:
--- 472,476 ----
          new_callers[func] = target[func]
      for func in source.keys():
!         if func in new_callers:
              new_callers[func] = source[func] + new_callers[func]
          else:

Index: pyclbr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pyclbr.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** pyclbr.py	24 Oct 2001 20:22:40 -0000	1.23
--- pyclbr.py	1 Jun 2002 14:18:46 -0000	1.24
***************
*** 172,176 ****
          return child
  
!     if _modules.has_key(module):
          # we've seen this module before...
          return _modules[module]
--- 172,176 ----
          return child
  
!     if module in _modules:
          # we've seen this module before...
          return _modules[module]
***************
*** 266,270 ****
                  for n in inherit.split(','):
                      n = n.strip()
!                     if dict.has_key(n):
                          # we know this super class
                          n = dict[n]
--- 266,270 ----
                  for n in inherit.split(','):
                      n = n.strip()
!                     if n in dict:
                          # we know this super class
                          n = dict[n]
***************
*** 279,285 ****
                              m = c[-2]
                              c = c[-1]
!                             if _modules.has_key(m):
                                  d = _modules[m]
!                                 if d.has_key(c):
                                      n = d[c]
                      names.append(n)
--- 279,285 ----
                              m = c[-2]
                              c = c[-1]
!                             if m in _modules:
                                  d = _modules[m]
!                                 if c in d:
                                      n = d[c]
                      names.append(n)
***************
*** 317,321 ****
              for n in names:
                  n = n.strip()
!                 if d.has_key(n):
                      dict[n] = d[n]
                  elif n == '*':
--- 317,321 ----
              for n in names:
                  n = n.strip()
!                 if n in d:
                      dict[n] = d[n]
                  elif n == '*':
***************
*** 327,331 ****
                      for n in d.keys():
                          if n[0] != '_' and \
!                            not dict.has_key(n):
                              dict[n] = d[n]
          else:
--- 327,331 ----
                      for n in d.keys():
                          if n[0] != '_' and \
!                            not n in dict:
                              dict[n] = d[n]
          else:

Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** pydoc.py	21 May 2002 20:56:15 -0000	1.63
--- pydoc.py	1 Jun 2002 14:18:46 -0000	1.64
***************
*** 224,228 ****
      not the package at the beginning.  If the optional 'forceload' argument
      is 1, we reload the module from disk (unless it's a dynamic extension)."""
!     if forceload and sys.modules.has_key(path):
          # This is the only way to be sure.  Checking the mtime of the file
          # isn't good enough (e.g. what if the module contains a class that
--- 224,228 ----
      not the package at the beginning.  If the optional 'forceload' argument
      is 1, we reload the module from disk (unless it's a dynamic extension)."""
!     if forceload and path in sys.modules:
          # This is the only way to be sure.  Checking the mtime of the file
          # isn't good enough (e.g. what if the module contains a class that
***************
*** 242,246 ****
          # Did the error occur before or after the module was found?
          (exc, value, tb) = info = sys.exc_info()
!         if sys.modules.has_key(path):
              # An error occured while executing the imported module.
              raise ErrorDuringImport(sys.modules[path].__file__, info)
--- 242,246 ----
          # Did the error occur before or after the module was found?
          (exc, value, tb) = info = sys.exc_info()
!         if path in sys.modules:
              # An error occured while executing the imported module.
              raise ErrorDuringImport(sys.modules[path].__file__, info)
***************
*** 404,408 ****
          """Make a link for an identifier, given name-to-URL mappings."""
          for dict in dicts:
!             if dict.has_key(name):
                  return '<a href="%s">%s</a>' % (dict[name], name)
          return name
--- 404,408 ----
          """Make a link for an identifier, given name-to-URL mappings."""
          for dict in dicts:
!             if name in dict:
                  return '<a href="%s">%s</a>' % (dict[name], name)
          return name
***************
*** 537,541 ****
                  if modname != name and module and hasattr(module, key):
                      if getattr(module, key) is base:
!                         if not cdict.has_key(key):
                              cdict[key] = cdict[base] = modname + '.html#' + key
          funcs, fdict = [], {}
--- 537,541 ----
                  if modname != name and module and hasattr(module, key):
                      if getattr(module, key) is base:
!                         if not key in cdict:
                              cdict[key] = cdict[base] = modname + '.html#' + key
          funcs, fdict = [], {}
***************
*** 779,783 ****
              title = '<a name="%s"><strong>%s</strong></a>' % (anchor, realname)
          else:
!             if (cl and cl.__dict__.has_key(realname) and
                  cl.__dict__[realname] is object):
                  reallink = '<a href="#%s">%s</a>' % (
--- 779,783 ----
              title = '<a name="%s"><strong>%s</strong></a>' % (anchor, realname)
          else:
!             if (cl and realname in cl.__dict__ and
                  cl.__dict__[realname] is object):
                  reallink = '<a href="#%s">%s</a>' % (
***************
*** 823,828 ****
          def found(name, ispackage,
                    modpkgs=modpkgs, shadowed=shadowed, seen=seen):
!             if not seen.has_key(name):
!                 modpkgs.append((name, '', ispackage, shadowed.has_key(name)))
                  seen[name] = 1
                  shadowed[name] = 1
--- 823,828 ----
          def found(name, ispackage,
                    modpkgs=modpkgs, shadowed=shadowed, seen=seen):
!             if not name in seen:
!                 modpkgs.append((name, '', ispackage, name)) in shadowed
                  seen[name] = 1
                  shadowed[name] = 1
***************
*** 1141,1145 ****
              title = self.bold(realname)
          else:
!             if (cl and cl.__dict__.has_key(realname) and
                  cl.__dict__[realname] is object):
                  skipdocs = 1
--- 1141,1145 ----
              title = self.bold(realname)
          else:
!             if (cl and realname in cl.__dict__ and
                  cl.__dict__[realname] is object):
                  skipdocs = 1
***************
*** 1190,1194 ****
      if os.environ.get('TERM') in ['dumb', 'emacs']:
          return plainpager
!     if os.environ.has_key('PAGER'):
          if sys.platform == 'win32': # pipes completely broken in Windows
              return lambda text: tempfilepager(plain(text), os.environ['PAGER'])
--- 1190,1194 ----
      if os.environ.get('TERM') in ['dumb', 'emacs']:
          return plainpager
!     if 'PAGER' in os.environ:
          if sys.platform == 'win32': # pipes completely broken in Windows
              return lambda text: tempfilepager(plain(text), os.environ['PAGER'])
***************
*** 1376,1380 ****
              if modname:
                  modname = pkgpath + modname
!                 if not done.has_key(modname):
                      done[modname] = 1
                      writedoc(modname)
--- 1376,1380 ----
              if modname:
                  modname = pkgpath + modname
!                 if not modname in done:
                      done[modname] = 1
                      writedoc(modname)
***************
*** 1547,1552 ****
              elif request[:8] == 'modules ':
                  self.listmodules(split(request)[1])
!             elif self.keywords.has_key(request): self.showtopic(request)
!             elif self.topics.has_key(request): self.showtopic(request)
              elif request: doc(request, 'Help on %s:')
          elif isinstance(request, Helper): self()
--- 1547,1552 ----
              elif request[:8] == 'modules ':
                  self.listmodules(split(request)[1])
!             elif request in self.keywords: self.showtopic(request)
!             elif request in self.topics: self.showtopic(request)
              elif request: doc(request, 'Help on %s:')
          elif isinstance(request, Helper): self()
***************
*** 1741,1745 ****
              if os.path.isfile(path) and modname:
                  modname = package + (package and '.') + modname
!                 if not seen.has_key(modname):
                      seen[modname] = 1 # if we see spam.py, skip spam.pyc
                      if key is None:
--- 1741,1745 ----
              if os.path.isfile(path) and modname:
                  modname = package + (package and '.') + modname
!                 if not modname in seen:
                      seen[modname] = 1 # if we see spam.py, skip spam.pyc
                      if key is None:

Index: regsub.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/regsub.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** regsub.py	15 Feb 2001 22:15:13 -0000	1.13
--- regsub.py	1 Jun 2002 14:18:46 -0000	1.14
***************
*** 135,139 ****
          return pat              # Assume it is a compiled regex
      key = (pat, regex.get_syntax())
!     if cache.has_key(key):
          prog = cache[key]       # Get it from the cache
      else:
--- 135,139 ----
          return pat              # Assume it is a compiled regex
      key = (pat, regex.get_syntax())
!     if key in cache:
          prog = cache[key]       # Get it from the cache
      else:

Index: rexec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rexec.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** rexec.py	31 May 2002 21:12:17 -0000	1.37
--- rexec.py	1 Jun 2002 14:18:46 -0000	1.38
***************
*** 207,211 ****
          if name not in self.ok_dynamic_modules:
              raise ImportError, "untrusted dynamic module: %s" % name
!         if sys.modules.has_key(name):
              src = sys.modules[name]
          else:
--- 207,211 ----
          if name not in self.ok_dynamic_modules:
              raise ImportError, "untrusted dynamic module: %s" % name
!         if name in sys.modules:
              src = sys.modules[name]
          else:
***************
*** 289,293 ****
  
      def add_module(self, mname):
!         if self.modules.has_key(mname):
              return self.modules[mname]
          self.modules[mname] = m = self.hooks.new_module(mname)
--- 289,293 ----
  
      def add_module(self, mname):
!         if mname in self.modules:
              return self.modules[mname]
          self.modules[mname] = m = self.hooks.new_module(mname)

Index: rfc822.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rfc822.py,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** rfc822.py	23 May 2002 03:21:01 -0000	1.70
--- rfc822.py	1 Jun 2002 14:18:46 -0000	1.71
***************
*** 407,411 ****
          """Delete all occurrences of a specific header, if it is present."""
          name = name.lower()
!         if not self.dict.has_key(name):
              return
          del self.dict[name]
--- 407,411 ----
          """Delete all occurrences of a specific header, if it is present."""
          name = name.lower()
!         if not name in self.dict:
              return
          del self.dict[name]
***************
*** 428,432 ****
      def get(self, name, default=""):
          name = name.lower()
!         if self.dict.has_key(name):
              return self.dict[name]
          else:
--- 428,432 ----
      def get(self, name, default=""):
          name = name.lower()
!         if name in self.dict:
              return self.dict[name]
          else:
***************
*** 435,439 ****
      def setdefault(self, name, default=""):
          lowername = name.lower()
!         if self.dict.has_key(lowername):
              return self.dict[lowername]
          else:
--- 435,439 ----
      def setdefault(self, name, default=""):
          lowername = name.lower()
!         if lowername in self.dict:
              return self.dict[lowername]
          else:
***************
*** 447,451 ****
      def has_key(self, name):
          """Determine whether a message contains the named header."""
!         return self.dict.has_key(name.lower())
  
      def keys(self):
--- 447,455 ----
      def has_key(self, name):
          """Determine whether a message contains the named header."""
!         return name.lower() in self.dict
! 
!     def __contains__(self, name):
!         """Determine whether a message contains the named header."""
!         return name.lower() in self.dict        
  
      def keys(self):
***************
*** 920,924 ****
      tzoffset = None
      tz = tz.upper()
!     if _timezones.has_key(tz):
          tzoffset = _timezones[tz]
      else:
--- 924,928 ----
      tzoffset = None
      tz = tz.upper()
!     if tz in _timezones:
          tzoffset = _timezones[tz]
      else:
***************
*** 1011,1016 ****
      print '-'*70
      print 'len =', len(m)
!     if m.has_key('Date'): print 'Date =', m['Date']
!     if m.has_key('X-Nonsense'): pass
      print 'keys =', m.keys()
      print 'values =', m.values()
--- 1015,1020 ----
      print '-'*70
      print 'len =', len(m)
!     if 'Date' in m: print 'Date =', m['Date']
!     if 'X-Nonsense' in m: pass
      print 'keys =', m.keys()
      print 'values =', m.values()

Index: sgmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sgmllib.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** sgmllib.py	26 Oct 2001 18:02:28 -0000	1.39
--- sgmllib.py	1 Jun 2002 14:18:46 -0000	1.40
***************
*** 397,401 ****
          """
          table = self.entitydefs
!         if table.has_key(name):
              self.handle_data(table[name])
          else:
--- 397,401 ----
          """
          table = self.entitydefs
!         if name in table:
              self.handle_data(table[name])
          else:

Index: site.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** site.py	4 Apr 2002 17:52:50 -0000	1.42
--- site.py	1 Jun 2002 14:18:46 -0000	1.43
***************
*** 85,89 ****
              continue
      dir, dircase = makepath(dir)
!     if not _dirs_in_sys_path.has_key(dircase):
          L.append(dir)
          _dirs_in_sys_path[dircase] = 1
--- 85,89 ----
              continue
      dir, dircase = makepath(dir)
!     if not dircase in _dirs_in_sys_path:
          L.append(dir)
          _dirs_in_sys_path[dircase] = 1
***************
*** 117,121 ****
          reset = 0
      sitedir, sitedircase = makepath(sitedir)
!     if not _dirs_in_sys_path.has_key(sitedircase):
          sys.path.append(sitedir)        # Add path component
      try:
--- 117,121 ----
          reset = 0
      sitedir, sitedircase = makepath(sitedir)
!     if not sitedircase in _dirs_in_sys_path:
          sys.path.append(sitedir)        # Add path component
      try:
***************
*** 154,158 ****
              dir = dir[:-1]
          dir, dircase = makepath(sitedir, dir)
!         if not _dirs_in_sys_path.has_key(dircase) and os.path.exists(dir):
              sys.path.append(dir)
              _dirs_in_sys_path[dircase] = 1
--- 154,158 ----
              dir = dir[:-1]
          dir, dircase = makepath(sitedir, dir)
!         if not dircase in _dirs_in_sys_path and os.path.exists(dir):
              sys.path.append(dir)
              _dirs_in_sys_path[dircase] = 1

Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** smtplib.py	31 May 2002 17:49:10 -0000	1.54
--- smtplib.py	1 Jun 2002 14:18:46 -0000	1.55
***************
*** 412,416 ****
      def has_extn(self, opt):
          """Does the server support a given SMTP service extension?"""
!         return self.esmtp_features.has_key(opt.lower())
  
      def help(self, args=''):
--- 412,416 ----
      def has_extn(self, opt):
          """Does the server support a given SMTP service extension?"""
!         return opt.lower() in self.esmtp_features
  
      def help(self, args=''):

Index: sre_parse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** sre_parse.py	7 Apr 2002 06:36:23 -0000	1.53
--- sre_parse.py	1 Jun 2002 14:18:46 -0000	1.54
***************
*** 569,575 ****
                  else:
                      # flags
!                     if not FLAGS.has_key(source.next):
                          raise error, "unexpected end of pattern"
!                     while FLAGS.has_key(source.next):
                          state.flags = state.flags | FLAGS[source.get()]
              if group:
--- 569,575 ----
                  else:
                      # flags
!                     if not source.next in FLAGS:
                          raise error, "unexpected end of pattern"
!                     while source.next in FLAGS:
                          state.flags = state.flags | FLAGS[source.get()]
              if group:

Index: statcache.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/statcache.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** statcache.py	10 Apr 2002 02:04:00 -0000	1.14
--- statcache.py	1 Jun 2002 14:18:46 -0000	1.15
***************
*** 17,21 ****
  # The cache.  Keys are pathnames, values are os.stat outcomes.
  # Remember that multiple threads may be calling this!  So, e.g., that
! # cache.has_key(path) returns 1 doesn't mean the cache will still contain
  # path on the next line.  Code defensively.
  
--- 17,21 ----
  # The cache.  Keys are pathnames, values are os.stat outcomes.
  # Remember that multiple threads may be calling this!  So, e.g., that
! # path in cache returns 1 doesn't mean the cache will still contain
  # path on the next line.  Code defensively.
  

Index: tempfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tempfile.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** tempfile.py	24 Mar 2002 22:21:48 -0000	1.38
--- tempfile.py	1 Jun 2002 14:18:46 -0000	1.39
***************
*** 64,68 ****
              attempdirs.insert(0, scrapdir)
      for envname in 'TMPDIR', 'TEMP', 'TMP':
!         if os.environ.has_key(envname):
              attempdirs.insert(0, os.environ[envname])
      testfile = gettempprefix() + 'test'
--- 64,68 ----
              attempdirs.insert(0, scrapdir)
      for envname in 'TMPDIR', 'TEMP', 'TMP':
!         if envname in os.environ:
              attempdirs.insert(0, os.environ[envname])
      testfile = gettempprefix() + 'test'

Index: toaiff.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/toaiff.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** toaiff.py	13 Aug 2001 14:40:47 -0000	1.11
--- toaiff.py	1 Jun 2002 14:18:47 -0000	1.12
***************
*** 96,100 ****
      if ftype == 'aiff':
          return fname
!     if ftype is None or not table.has_key(ftype):
          raise error, \
                  filename + ': unsupported audio file type ' + `ftype`
--- 96,100 ----
      if ftype == 'aiff':
          return fname
!     if ftype is None or not ftype in table:
          raise error, \
                  filename + ': unsupported audio file type ' + `ftype`

Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -d -r1.144 -r1.145
*** urllib.py	24 May 2002 17:58:05 -0000	1.144
--- urllib.py	1 Jun 2002 14:18:47 -0000	1.145
***************
*** 154,158 ****
          """Use URLopener().open(file) instead of open(file, 'r')."""
          fullurl = unwrap(toBytes(fullurl))
!         if self.tempcache and self.tempcache.has_key(fullurl):
              filename, headers = self.tempcache[fullurl]
              fp = open(filename, 'rb')
--- 154,158 ----
          """Use URLopener().open(file) instead of open(file, 'r')."""
          fullurl = unwrap(toBytes(fullurl))
!         if self.tempcache and fullurl in self.tempcache:
              filename, headers = self.tempcache[fullurl]
              fp = open(filename, 'rb')
***************
*** 161,165 ****
          if not urltype:
              urltype = 'file'
!         if self.proxies.has_key(urltype):
              proxy = self.proxies[urltype]
              urltype, proxyhost = splittype(proxy)
--- 161,165 ----
          if not urltype:
              urltype = 'file'
!         if urltype in self.proxies:
              proxy = self.proxies[urltype]
              urltype, proxyhost = splittype(proxy)
***************
*** 201,205 ****
          or (tempfilename, headers) for a remote object."""
          url = unwrap(toBytes(url))
!         if self.tempcache and self.tempcache.has_key(url):
              return self.tempcache[url]
          type, url1 = splittype(url)
--- 201,205 ----
          or (tempfilename, headers) for a remote object."""
          url = unwrap(toBytes(url))
!         if self.tempcache and url in self.tempcache:
              return self.tempcache[url]
          type, url1 = splittype(url)
***************
*** 231,235 ****
          blocknum = 1
          if reporthook:
!             if headers.has_key("content-length"):
                  size = int(headers["Content-Length"])
              reporthook(0, bs, size)
--- 231,235 ----
          blocknum = 1
          if reporthook:
!             if "content-length" in headers:
                  size = int(headers["Content-Length"])
              reporthook(0, bs, size)
***************
*** 474,478 ****
                      v.close()
          try:
!             if not self.ftpcache.has_key(key):
                  self.ftpcache[key] = \
                      ftpwrapper(user, passwd, host, port, dirs)
--- 474,478 ----
                      v.close()
          try:
!             if not key in self.ftpcache:
                  self.ftpcache[key] = \
                      ftpwrapper(user, passwd, host, port, dirs)
***************
*** 567,573 ****
  
      def redirect_internal(self, url, fp, errcode, errmsg, headers, data):
!         if headers.has_key('location'):
              newurl = headers['location']
!         elif headers.has_key('uri'):
              newurl = headers['uri']
          else:
--- 567,573 ----
  
      def redirect_internal(self, url, fp, errcode, errmsg, headers, data):
!         if 'location' in headers:
              newurl = headers['location']
!         elif 'uri' in headers:
              newurl = headers['uri']
          else:
***************
*** 590,594 ****
          See this URL for a description of the basic authentication scheme:
          http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt"""
!         if not headers.has_key('www-authenticate'):
              URLopener.http_error_default(self, url, fp,
                                           errcode, errmsg, headers)
--- 590,594 ----
          See this URL for a description of the basic authentication scheme:
          http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt"""
!         if not 'www-authenticate' in headers:
              URLopener.http_error_default(self, url, fp,
                                           errcode, errmsg, headers)
***************
*** 634,638 ****
      def get_user_passwd(self, host, realm, clear_cache = 0):
          key = realm + '@' + host.lower()
!         if self.auth_cache.has_key(key):
              if clear_cache:
                  del self.auth_cache[key]
--- 634,638 ----
      def get_user_passwd(self, host, realm, clear_cache = 0):
          key = realm + '@' + host.lower()
!         if key in self.auth_cache:
              if clear_cache:
                  del self.auth_cache[key]
***************
*** 1109,1113 ****
      for i in range(len(res)):
          c = res[i]
!         if not _fast_safe.has_key(c):
              res[i] = '%%%02X' % ord(c)
      return ''.join(res)
--- 1109,1113 ----
      for i in range(len(res)):
          c = res[i]
!         if not c in _fast_safe:
              res[i] = '%%%02X' % ord(c)
      return ''.join(res)
***************
*** 1254,1258 ****
          proxies = {}
          # HTTP:
!         if config.has_key('UseHTTPProxy') and config['UseHTTPProxy']:
              try:
                  value = config['HTTPProxyHost']
--- 1254,1258 ----
          proxies = {}
          # HTTP:
!         if 'UseHTTPProxy' in config and config['UseHTTPProxy']:
              try:
                  value = config['HTTPProxyHost']

Index: urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** urllib2.py	20 May 2002 14:30:06 -0000	1.28
--- urllib2.py	1 Jun 2002 14:18:47 -0000	1.29
***************
*** 256,260 ****
              if meth[-5:] == '_open':
                  protocol = meth[:-5]
!                 if self.handle_open.has_key(protocol):
                      self.handle_open[protocol].append(handler)
                  else:
--- 256,260 ----
              if meth[-5:] == '_open':
                  protocol = meth[:-5]
!                 if protocol in self.handle_open:
                      self.handle_open[protocol].append(handler)
                  else:
***************
*** 272,276 ****
                      pass
                  dict = self.handle_error.get(proto, {})
!                 if dict.has_key(kind):
                      dict[kind].append(handler)
                  else:
--- 272,276 ----
                      pass
                  dict = self.handle_error.get(proto, {})
!                 if kind in dict:
                      dict[kind].append(handler)
                  else:
***************
*** 405,411 ****
      # attribute to the Request object.
      def http_error_302(self, req, fp, code, msg, headers):
!         if headers.has_key('location'):
              newurl = headers['location']
!         elif headers.has_key('uri'):
              newurl = headers['uri']
          else:
--- 405,411 ----
      # attribute to the Request object.
      def http_error_302(self, req, fp, code, msg, headers):
!         if 'location' in headers:
              newurl = headers['location']
!         elif 'uri' in headers:
              newurl = headers['uri']
          else:
***************
*** 420,424 ****
          if hasattr(req, 'error_302_dict'):
              if len(req.error_302_dict)>10 or \
!                req.error_302_dict.has_key(newurl):
                  raise HTTPError(req.get_full_url(), code,
                                  self.inf_msg + msg, headers, fp)
--- 420,424 ----
          if hasattr(req, 'error_302_dict'):
              if len(req.error_302_dict)>10 or \
!                newurl in req.error_302_dict:
                  raise HTTPError(req.get_full_url(), code,
                                  self.inf_msg + msg, headers, fp)
***************
*** 506,510 ****
  
      def add_proxy(self, cpo):
!         if self.proxies.has_key(cpo.proto):
              self.proxies[cpo.proto].append(cpo)
          else:
--- 506,510 ----
  
      def add_proxy(self, cpo):
!         if cpo.proto in self.proxies:
              self.proxies[cpo.proto].append(cpo)
          else:
***************
*** 520,524 ****
              uri = [uri]
          uri = tuple(map(self.reduce_uri, uri))
!         if not self.passwd.has_key(realm):
              self.passwd[realm] = {}
          self.passwd[realm][uri] = (user, passwd)
--- 520,524 ----
              uri = [uri]
          uri = tuple(map(self.reduce_uri, uri))
!         if not realm in self.passwd:
              self.passwd[realm] = {}
          self.passwd[realm][uri] = (user, passwd)
***************
*** 752,759 ****
                  data = req.get_data()
                  h.putrequest('POST', req.get_selector())
!                 if not req.headers.has_key('Content-type'):
                      h.putheader('Content-type',
                                  'application/x-www-form-urlencoded')
!                 if not req.headers.has_key('Content-length'):
                      h.putheader('Content-length', '%d' % len(data))
              else:
--- 752,759 ----
                  data = req.get_data()
                  h.putrequest('POST', req.get_selector())
!                 if not 'Content-type' in req.headers:
                      h.putheader('Content-type',
                                  'application/x-www-form-urlencoded')
!                 if not 'Content-length' in req.headers:
                      h.putheader('Content-length', '%d' % len(data))
              else:
***************
*** 955,959 ****
      def connect_ftp(self, user, passwd, host, port, dirs):
          key = user, passwd, host, port
!         if self.cache.has_key(key):
              self.timeout[key] = time.time() + self.delay
          else:
--- 955,959 ----
      def connect_ftp(self, user, passwd, host, port, dirs):
          key = user, passwd, host, port
!         if key in self.cache:
              self.timeout[key] = time.time() + self.delay
          else:

Index: user.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/user.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** user.py	30 Mar 2000 15:00:33 -0000	1.5
--- user.py	1 Jun 2002 14:18:47 -0000	1.6
***************
*** 25,33 ****
  
  home = os.curdir                        # Default
! if os.environ.has_key('HOME'):
      home = os.environ['HOME']
  elif os.name == 'nt':                   # Contributed by Jeff Bauer
!     if os.environ.has_key('HOMEPATH'):
!         if os.environ.has_key('HOMEDRIVE'):
              home = os.environ['HOMEDRIVE'] + os.environ['HOMEPATH']
          else:
--- 25,33 ----
  
  home = os.curdir                        # Default
! if 'HOME' in os.environ:
      home = os.environ['HOME']
  elif os.name == 'nt':                   # Contributed by Jeff Bauer
!     if 'HOMEPATH' in os.environ:
!         if 'HOMEDRIVE' in os.environ:
              home = os.environ['HOMEDRIVE'] + os.environ['HOMEPATH']
          else:

Index: warnings.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/warnings.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** warnings.py	29 May 2002 15:54:53 -0000	1.14
--- warnings.py	1 Jun 2002 14:18:47 -0000	1.15
***************
*** 28,32 ****
          globals = caller.f_globals
          lineno = caller.f_lineno
!     if globals.has_key('__name__'):
          module = globals['__name__']
      else:
--- 28,32 ----
          globals = caller.f_globals
          lineno = caller.f_lineno
!     if '__name__' in globals:
          module = globals['__name__']
      else:

Index: weakref.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/weakref.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** weakref.py	6 Nov 2001 16:36:53 -0000	1.15
--- weakref.py	1 Jun 2002 14:18:47 -0000	1.16
***************
*** 184,189 ****
          except TypeError:
              return 0
!         return self.data.has_key(wr)
  
      def items(self):
          L = []
--- 184,196 ----
          except TypeError:
              return 0
!         return wr in self.data
  
+     def __contains__(self, key):
+         try:
+             wr = ref(key)
+         except TypeError:
+             return 0
+         return wr in self.data
+     
      def items(self):
          L = []

Index: webbrowser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** webbrowser.py	4 Apr 2002 22:55:58 -0000	1.30
--- webbrowser.py	1 Jun 2002 14:18:47 -0000	1.31
***************
*** 313,317 ****
  # platform are, allow user to override them with the BROWSER variable.
  #
! if os.environ.has_key("BROWSER"):
      # It's the user's responsibility to register handlers for any unknown
      # browser referenced by this value, before calling open().
--- 313,317 ----
  # platform are, allow user to override them with the BROWSER variable.
  #
! if "BROWSER" in os.environ:
      # It's the user's responsibility to register handlers for any unknown
      # browser referenced by this value, before calling open().
***************
*** 319,323 ****
  
  for cmd in _tryorder:
!     if not _browsers.has_key(cmd.lower()):
          if _iscommand(cmd.lower()):
              register(cmd.lower(), None, GenericBrowser(
--- 319,323 ----
  
  for cmd in _tryorder:
!     if not cmd.lower() in _browsers:
          if _iscommand(cmd.lower()):
              register(cmd.lower(), None, GenericBrowser(
***************
*** 326,330 ****
  del cmd
  
! _tryorder = filter(lambda x: _browsers.has_key(x.lower())
                     or x.find("%s") > -1, _tryorder)
  # what to do if _tryorder is now empty?
--- 326,330 ----
  del cmd
  
! _tryorder = filter(lambda x: x.lower() in _browsers
                     or x.find("%s") > -1, _tryorder)
  # what to do if _tryorder is now empty?

Index: xmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xmllib.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** xmllib.py	10 Apr 2002 02:04:00 -0000	1.29
--- xmllib.py	1 Jun 2002 14:18:47 -0000	1.30
***************
*** 103,115 ****
      def __init__(self, **kw):
          self.__fixed = 0
!         if kw.has_key('accept_unquoted_attributes'):
              self.__accept_unquoted_attributes = kw['accept_unquoted_attributes']
!         if kw.has_key('accept_missing_endtag_name'):
              self.__accept_missing_endtag_name = kw['accept_missing_endtag_name']
!         if kw.has_key('map_case'):
              self.__map_case = kw['map_case']
!         if kw.has_key('accept_utf8'):
              self.__accept_utf8 = kw['accept_utf8']
!         if kw.has_key('translate_attribute_references'):
              self.__translate_attribute_references = kw['translate_attribute_references']
          self.reset()
--- 103,115 ----
      def __init__(self, **kw):
          self.__fixed = 0
!         if 'accept_unquoted_attributes' in kw:
              self.__accept_unquoted_attributes = kw['accept_unquoted_attributes']
!         if 'accept_missing_endtag_name' in kw:
              self.__accept_missing_endtag_name = kw['accept_missing_endtag_name']
!         if 'map_case' in kw:
              self.__map_case = kw['map_case']
!         if 'accept_utf8' in kw:
              self.__accept_utf8 = kw['accept_utf8']
!         if 'translate_attribute_references' in kw:
              self.__translate_attribute_references = kw['translate_attribute_references']
          self.reset()
***************
*** 207,211 ****
                      i = i-1
              elif all:
!                 if self.entitydefs.has_key(str):
                      str = self.entitydefs[str]
                      rescan = 1
--- 207,211 ----
                      i = i-1
              elif all:
!                 if str in self.entitydefs:
                      str = self.entitydefs[str]
                      rescan = 1
***************
*** 376,380 ****
                      if self.__map_case:
                          name = name.lower()
!                     if self.entitydefs.has_key(name):
                          self.rawdata = rawdata = rawdata[:res.start(0)] + self.entitydefs[name] + rawdata[i:]
                          n = len(rawdata)
--- 376,380 ----
                      if self.__map_case:
                          name = name.lower()
!                     if name in self.entitydefs:
                          self.rawdata = rawdata = rawdata[:res.start(0)] + self.entitydefs[name] + rawdata[i:]
                          n = len(rawdata)
***************
*** 534,540 ****
                  self.syntax_error('namespace declaration inside namespace declaration')
              for attrname in attrdict.keys():
!                 if not self.__xml_namespace_attributes.has_key(attrname):
                      self.syntax_error("unknown attribute `%s' in xml:namespace tag" % attrname)
!             if not attrdict.has_key('ns') or not attrdict.has_key('prefix'):
                  self.syntax_error('xml:namespace without required attributes')
              prefix = attrdict.get('prefix')
--- 534,540 ----
                  self.syntax_error('namespace declaration inside namespace declaration')
              for attrname in attrdict.keys():
!                 if not attrname in self.__xml_namespace_attributes:
                      self.syntax_error("unknown attribute `%s' in xml:namespace tag" % attrname)
!             if not 'ns' in attrdict or not 'prefix' in attrdict:
                  self.syntax_error('xml:namespace without required attributes')
              prefix = attrdict.get('prefix')
***************
*** 542,546 ****
                  self.syntax_error('xml:namespace illegal prefix value')
                  return end.end(0)
!             if self.__namespaces.has_key(prefix):
                  self.syntax_error('xml:namespace prefix not unique')
              self.__namespaces[prefix] = attrdict['ns']
--- 542,546 ----
                  self.syntax_error('xml:namespace illegal prefix value')
                  return end.end(0)
!             if prefix in self.__namespaces:
                  self.syntax_error('xml:namespace prefix not unique')
              self.__namespaces[prefix] = attrdict['ns']
***************
*** 582,586 ****
              if '<' in attrvalue:
                  self.syntax_error("`<' illegal in attribute value")
!             if attrdict.has_key(attrname):
                  self.syntax_error("attribute `%s' specified twice" % attrname)
              attrvalue = attrvalue.translate(attrtrans)
--- 582,586 ----
              if '<' in attrvalue:
                  self.syntax_error("`<' illegal in attribute value")
!             if attrname in attrdict:
                  self.syntax_error("attribute `%s' specified twice" % attrname)
              attrvalue = attrvalue.translate(attrtrans)
***************
*** 620,624 ****
              ns = None
              for t, d, nst in self.stack:
!                 if d.has_key(prefix):
                      ns = d[prefix]
              if ns is None and prefix != '':
--- 620,624 ----
              ns = None
              for t, d, nst in self.stack:
!                 if prefix in d:
                      ns = d[prefix]
              if ns is None and prefix != '':
***************
*** 646,650 ****
                      ans = None
                      for t, d, nst in self.stack:
!                         if d.has_key(aprefix):
                              ans = d[aprefix]
                      if ans is None and aprefix != '':
--- 646,650 ----
                      ans = None
                      for t, d, nst in self.stack:
!                         if aprefix in d:
                              ans = d[aprefix]
                      if ans is None and aprefix != '':
***************
*** 662,669 ****
          if attributes is not None:
              for key in attrdict.keys():
!                 if not attributes.has_key(key):
                      self.syntax_error("unknown attribute `%s' in tag `%s'" % (attrnamemap[key], tagname))
              for key, val in attributes.items():
!                 if val is not None and not attrdict.has_key(key):
                      attrdict[key] = val
          method = self.elements.get(nstag, (None, None))[0]
--- 662,669 ----
          if attributes is not None:
              for key in attrdict.keys():
!                 if not key in attributes:
                      self.syntax_error("unknown attribute `%s' in tag `%s'" % (attrnamemap[key], tagname))
              for key, val in attributes.items():
!                 if val is not None and not key in attrdict:
                      attrdict[key] = val
          method = self.elements.get(nstag, (None, None))[0]

Index: xmlrpclib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xmlrpclib.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** xmlrpclib.py	26 Mar 2002 16:23:28 -0000	1.16
--- xmlrpclib.py	1 Jun 2002 14:18:47 -0000	1.17
***************
*** 497,501 ****
          if value:
              i = id(value)
!             if self.memo.has_key(i):
                  raise TypeError, "cannot marshal recursive data structures"
              self.memo[i] = None
--- 497,501 ----
          if value:
              i = id(value)
!             if i in self.memo:
                  raise TypeError, "cannot marshal recursive data structures"
              self.memo[i] = None

Index: zipfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/zipfile.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** zipfile.py	7 Apr 2002 06:36:23 -0000	1.21
--- zipfile.py	1 Jun 2002 14:18:47 -0000	1.22
***************
*** 355,359 ****
      def _writecheck(self, zinfo):
          """Check for errors before writing a file to the archive."""
!         if self.NameToInfo.has_key(zinfo.filename):
              if self.debug:      # Warning for duplicate names
                  print "Duplicate name:", zinfo.filename
--- 355,359 ----
      def _writecheck(self, zinfo):
          """Check for errors before writing a file to the archive."""
!         if zinfo.filename in self.NameToInfo:
              if self.debug:      # Warning for duplicate names
                  print "Duplicate name:", zinfo.filename