[Python-checkins] python/dist/src/Lib BaseHTTPServer.py,1.24,1.25 UserList.py,1.17,1.18 atexit.py,1.5,1.6 bdb.py,1.41,1.42 cgi.py,1.75,1.76 copy.py,1.39,1.40 formatter.py,1.22,1.23 ihooks.py,1.15,1.16 imaplib.py,1.59,1.60 mhlib.py,1.34,1.35 mimify.py,1.21,1.22 modulefinder.py,1.4,1.5 nntplib.py,1.34,1.35 os.py,1.68,1.69 pdb.py,1.61,1.62 pre.py,1.13,1.14 profile.py,1.47,1.48 pstats.py,1.27,1.28 pty.py,1.14,1.15 pydoc.py,1.77,1.78 rexec.py,1.47,1.48 robotparser.py,1.16,1.17 sched.py,1.13,1.14 telnetlib.py,1.22,1.23 threading.py,1.31,1.32 tokenize.py,1.34,1.35 trace.py,1.2,1.3 unittest.py,1.21,1.22 urllib.py,1.153,1.154 xdrlib.py,1.14,1.15 xmllib.py,1.30,1.31 xmlrpclib.py,1.23,1.24

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Thu, 27 Feb 2003 12:15:55 -0800


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

Modified Files:
	BaseHTTPServer.py UserList.py atexit.py bdb.py cgi.py copy.py 
	formatter.py ihooks.py imaplib.py mhlib.py mimify.py 
	modulefinder.py nntplib.py os.py pdb.py pre.py profile.py 
	pstats.py pty.py pydoc.py rexec.py robotparser.py sched.py 
	telnetlib.py threading.py tokenize.py trace.py unittest.py 
	urllib.py xdrlib.py xmllib.py xmlrpclib.py 
Log Message:
Get rid of many apply() calls.

Index: BaseHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/BaseHTTPServer.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** BaseHTTPServer.py	3 Feb 2003 19:11:18 -0000	1.24
--- BaseHTTPServer.py	27 Feb 2003 20:14:29 -0000	1.25
***************
*** 416,420 ****
          """
  
!         apply(self.log_message, args)
  
      def log_message(self, format, *args):
--- 416,420 ----
          """
  
!         self.log_message(*args)
  
      def log_message(self, format, *args):

Index: UserList.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/UserList.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** UserList.py	9 Jun 2001 07:34:05 -0000	1.17
--- UserList.py	27 Feb 2003 20:14:31 -0000	1.18
***************
*** 78,82 ****
      def index(self, item): return self.data.index(item)
      def reverse(self): self.data.reverse()
!     def sort(self, *args): apply(self.data.sort, args)
      def extend(self, other):
          if isinstance(other, UserList):
--- 78,82 ----
      def index(self, item): return self.data.index(item)
      def reverse(self): self.data.reverse()
!     def sort(self, *args): self.data.sort(*args)
      def extend(self, other):
          if isinstance(other, UserList):

Index: atexit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/atexit.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** atexit.py	16 Jul 2002 19:30:58 -0000	1.5
--- atexit.py	27 Feb 2003 20:14:31 -0000	1.6
***************
*** 18,22 ****
      while _exithandlers:
          func, targs, kargs = _exithandlers.pop()
!         apply(func, targs, kargs)
  
  def register(func, *targs, **kargs):
--- 18,22 ----
      while _exithandlers:
          func, targs, kargs = _exithandlers.pop()
!         func(*targs, **kargs)
  
  def register(func, *targs, **kargs):

Index: bdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bdb.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** bdb.py	1 Jun 2002 14:18:45 -0000	1.41
--- bdb.py	27 Feb 2003 20:14:32 -0000	1.42
***************
*** 386,390 ****
          try:
              try:
!                 res = apply(func, args)
              except BdbQuit:
                  pass
--- 386,390 ----
          try:
              try:
!                 res = func(*args)
              except BdbQuit:
                  pass

Index: cgi.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** cgi.py	11 Sep 2002 18:20:34 -0000	1.75
--- cgi.py	27 Feb 2003 20:14:32 -0000	1.76
***************
*** 89,93 ****
      else:
          log = dolog
!     apply(log, allargs)
  
  def dolog(fmt, *args):
--- 89,93 ----
      else:
          log = dolog
!     log(*allargs)
  
  def dolog(fmt, *args):

Index: copy.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/copy.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** copy.py	19 Feb 2003 02:35:02 -0000	1.39
--- copy.py	27 Feb 2003 20:14:33 -0000	1.40
***************
*** 141,145 ****
      if hasattr(x, '__getinitargs__'):
          args = x.__getinitargs__()
!         y = apply(x.__class__, args)
      else:
          y = _EmptyClass()
--- 141,145 ----
      if hasattr(x, '__getinitargs__'):
          args = x.__getinitargs__()
!         y = x.__class__(*args)
      else:
          y = _EmptyClass()
***************
*** 294,298 ****
          args = x.__getinitargs__()
          args = deepcopy(args, memo)
!         y = apply(x.__class__, args)
      else:
          y = _EmptyClass()
--- 294,298 ----
          args = x.__getinitargs__()
          args = deepcopy(args, memo)
!         y = x.__class__(*args)
      else:
          y = _EmptyClass()

Index: formatter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/formatter.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** formatter.py	3 Jun 2002 15:58:31 -0000	1.22
--- formatter.py	27 Feb 2003 20:14:33 -0000	1.23
***************
*** 109,113 ****
          if not self.hard_break:
              self.writer.send_line_break()
!         apply(self.writer.send_hor_rule, args, kw)
          self.hard_break = self.nospace = 1
          self.have_label = self.para_end = self.softspace = self.parskip = 0
--- 109,113 ----
          if not self.hard_break:
              self.writer.send_line_break()
!         self.writer.send_hor_rule(*args, **kw)
          self.hard_break = self.nospace = 1
          self.have_label = self.para_end = self.softspace = self.parskip = 0

Index: ihooks.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ihooks.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** ihooks.py	16 Dec 2002 13:11:56 -0000	1.15
--- ihooks.py	27 Feb 2003 20:14:34 -0000	1.16
***************
*** 84,88 ****
      def note(self, *args):
          if self.verbose:
!             apply(self.message, args)
  
      def message(self, format, *args):
--- 84,88 ----
      def note(self, *args):
          if self.verbose:
!             self.message(*args)
  
      def message(self, format, *args):
***************
*** 195,199 ****
      # etc.
  
!     def openfile(self, *x): return apply(open, x)
      openfile_error = IOError
      def listdir(self, x): return os.listdir(x)
--- 195,199 ----
      # etc.
  
!     def openfile(self, *x): return open(*x)
      openfile_error = IOError
      def listdir(self, x): return os.listdir(x)

Index: imaplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imaplib.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** imaplib.py	13 Jan 2003 15:04:26 -0000	1.59
--- imaplib.py	27 Feb 2003 20:14:34 -0000	1.60
***************
*** 580,586 ****
          name = 'SEARCH'
          if charset:
!             typ, dat = apply(self._simple_command, (name, 'CHARSET', charset) + criteria)
          else:
!             typ, dat = apply(self._simple_command, (name,) + criteria)
          return self._untagged_response(typ, dat, name)
  
--- 580,586 ----
          name = 'SEARCH'
          if charset:
!             typ, dat = self._simple_command(name, 'CHARSET', charset, *criteria)
          else:
!             typ, dat = self._simple_command(name, *criteria)
          return self._untagged_response(typ, dat, name)
  
***************
*** 643,647 ****
          if (sort_criteria[0],sort_criteria[-1]) != ('(',')'):
              sort_criteria = '(%s)' % sort_criteria
!         typ, dat = apply(self._simple_command, (name, sort_criteria, charset) + search_criteria)
          return self._untagged_response(typ, dat, name)
  
--- 643,647 ----
          if (sort_criteria[0],sort_criteria[-1]) != ('(',')'):
              sort_criteria = '(%s)' % sort_criteria
!         typ, dat = self._simple_command(name, sort_criteria, charset, *search_criteria)
          return self._untagged_response(typ, dat, name)
  
***************
*** 693,697 ****
                                      % (command, self.state))
          name = 'UID'
!         typ, dat = apply(self._simple_command, (name, command) + args)
          if command in ('SEARCH', 'SORT'):
              name = command
--- 693,697 ----
                                      % (command, self.state))
          name = 'UID'
!         typ, dat = self._simple_command(name, command, *args)
          if command in ('SEARCH', 'SORT'):
              name = command
***************
*** 724,728 ****
          if not name in Commands:
              Commands[name] = (self.state,)
!         return apply(self._simple_command, (name,) + args)
  
  
--- 724,728 ----
          if not name in Commands:
              Commands[name] = (self.state,)
!         return self._simple_command(name, *args)
  
  
***************
*** 996,1000 ****
      def _simple_command(self, name, *args):
  
!         return self._command_complete(name, apply(self._command, (name,) + args))
  
  
--- 996,1000 ----
      def _simple_command(self, name, *args):
  
!         return self._command_complete(name, self._command(name, *args))
  
  
***************
*** 1041,1045 ****
              while n:
                  try:
!                     apply(self._mesg, self._cmd_log[i])
                  except:
                      pass
--- 1041,1045 ----
              while n:
                  try:
!                     self._mesg(*self._cmd_log[i])
                  except:
                      pass
***************
*** 1391,1395 ****
      def run(cmd, args):
          M._mesg('%s %s' % (cmd, args))
!         typ, dat = apply(getattr(M, cmd), args)
          M._mesg('%s => %s %s' % (cmd, typ, dat))
          if typ == 'NO': raise dat[0]
--- 1391,1395 ----
      def run(cmd, args):
          M._mesg('%s %s' % (cmd, args))
!         typ, dat = getattr(M, cmd)(*args)
          M._mesg('%s => %s %s' % (cmd, typ, dat))
          if typ == 'NO': raise dat[0]

Index: mhlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mhlib.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** mhlib.py	4 Jun 2002 02:17:04 -0000	1.34
--- mhlib.py	27 Feb 2003 20:14:35 -0000	1.35
***************
*** 252,256 ****
      def error(self, *args):
          """Error message handler."""
!         apply(self.mh.error, args)
  
      def getfullname(self):
--- 252,256 ----
      def error(self, *args):
          """Error message handler."""
!         self.mh.error(*args)
  
      def getfullname(self):

Index: mimify.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mimify.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** mimify.py	4 Jul 2001 10:15:58 -0000	1.21
--- mimify.py	27 Feb 2003 20:14:35 -0000	1.22
***************
*** 462,464 ****
      if decode_base64:
          encode_args = encode_args + (decode_base64,)
!     apply(encode, encode_args)
--- 462,464 ----
      if decode_base64:
          encode_args = encode_args + (decode_base64,)
!     encode(*encode_args)

Index: modulefinder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/modulefinder.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** modulefinder.py	1 Feb 2003 10:29:45 -0000	1.4
--- modulefinder.py	27 Feb 2003 20:14:35 -0000	1.5
***************
*** 98,102 ****
          if level <= self.debug:
              self.indent = self.indent + 1
!             apply(self.msg, args)
  
      def msgout(self, *args):
--- 98,102 ----
          if level <= self.debug:
              self.indent = self.indent + 1
!             self.msg(*args)
  
      def msgout(self, *args):
***************
*** 104,108 ****
          if level <= self.debug:
              self.indent = self.indent - 1
!             apply(self.msg, args)
  
      def run_script(self, pathname):
--- 104,108 ----
          if level <= self.debug:
              self.indent = self.indent - 1
!             self.msg(*args)
  
      def run_script(self, pathname):

Index: nntplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/nntplib.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** nntplib.py	24 Nov 2002 02:35:34 -0000	1.34
--- nntplib.py	27 Feb 2003 20:14:36 -0000	1.35
***************
*** 42,46 ****
      """Base class for all nntplib exceptions"""
      def __init__(self, *args):
!         apply(Exception.__init__, (self,)+args)
          try:
              self.response = args[0]
--- 42,46 ----
      """Base class for all nntplib exceptions"""
      def __init__(self, *args):
!         Exception.__init__(self, *args)
          try:
              self.response = args[0]

Index: os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** os.py	19 Feb 2003 02:35:03 -0000	1.68
--- os.py	27 Feb 2003 20:14:37 -0000	1.69
***************
*** 272,276 ****
      head, tail = path.split(file)
      if head:
!         apply(func, (file,) + argrest)
          return
      if 'PATH' in env:
--- 272,276 ----
      head, tail = path.split(file)
      if head:
!         func(file, *argrest)
          return
      if 'PATH' in env:
***************
*** 284,288 ****
          fullname = path.join(dir, file)
          try:
!             apply(func, (fullname,) + argrest)
          except error, e:
              tb = sys.exc_info()[2]
--- 284,288 ----
          fullname = path.join(dir, file)
          try:
!             func(fullname, *argrest)
          except error, e:
              tb = sys.exc_info()[2]

Index: pdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pdb.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** pdb.py	31 Jan 2003 17:48:29 -0000	1.61
--- pdb.py	27 Feb 2003 20:14:37 -0000	1.62
***************
*** 949,953 ****
  
  def runcall(*args):
!     return apply(Pdb().runcall, args)
  
  def set_trace():
--- 949,953 ----
  
  def runcall(*args):
!     return Pdb().runcall(*args)
  
  def set_trace():

Index: pre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pre.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** pre.py	27 Jun 2002 19:59:27 -0000	1.13
--- pre.py	27 Feb 2003 20:14:37 -0000	1.14
***************
*** 506,510 ****
          self.flags = statetuple[1]
          self.groupindex = statetuple[2]
!         self.code = apply(pcre_compile, statetuple)
  
  class _Dummy:
--- 506,510 ----
          self.flags = statetuple[1]
          self.groupindex = statetuple[2]
!         self.code = pcre_compile(*statetuple)
  
  class _Dummy:

Index: profile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/profile.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** profile.py	2 Jun 2002 18:55:56 -0000	1.47
--- profile.py	27 Feb 2003 20:14:38 -0000	1.48
***************
*** 417,421 ****
          sys.setprofile(self.dispatcher)
          try:
!             return apply(func, args, kw)
          finally:
              sys.setprofile(None)
--- 417,421 ----
          sys.setprofile(self.dispatcher)
          try:
!             return func(*args, **kw)
          finally:
              sys.setprofile(None)

Index: pstats.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pstats.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** pstats.py	2 Jun 2002 18:55:56 -0000	1.27
--- pstats.py	27 Feb 2003 20:14:38 -0000	1.28
***************
*** 77,81 ****
              args = args[1:]
          self.init(arg)
!         apply(self.add, args)
  
      def init(self, arg):
--- 77,81 ----
              args = args[1:]
          self.init(arg)
!         self.add(*args)
  
      def init(self, arg):
***************
*** 135,139 ****
      def add(self, *arg_list):
          if not arg_list: return self
!         if len(arg_list) > 1: apply(self.add, arg_list[1:])
          other = arg_list[0]
          if type(self) != type(other) or self.__class__ != other.__class__:
--- 135,139 ----
      def add(self, *arg_list):
          if not arg_list: return self
!         if len(arg_list) > 1: self.add(*arg_list[1:])
          other = arg_list[0]
          if type(self) != type(other) or self.__class__ != other.__class__:
***************
*** 529,533 ****
                  processed.append(term)
              if self.stats:
!                 apply(getattr(self.stats, fn), processed)
              else:
                  print "No statistics object is loaded."
--- 529,533 ----
                  processed.append(term)
              if self.stats:
!                 getattr(self.stats, fn)(*processed)
              else:
                  print "No statistics object is loaded."
***************
*** 595,599 ****
              abbrevs = self.stats.get_sort_arg_defs()
              if line and not filter(lambda x,a=abbrevs: x not in a,line.split()):
!                 apply(self.stats.sort_stats, line.split())
              else:
                  print "Valid sort keys (unique prefixes are accepted):"
--- 595,599 ----
              abbrevs = self.stats.get_sort_arg_defs()
              if line and not filter(lambda x,a=abbrevs: x not in a,line.split()):
!                 self.stats.sort_stats(*line.split())
              else:
                  print "Valid sort keys (unique prefixes are accepted):"

Index: pty.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pty.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** pty.py	29 Jan 2003 03:49:43 -0000	1.14
--- pty.py	27 Feb 2003 20:14:38 -0000	1.15
***************
*** 164,168 ****
      pid, master_fd = fork()
      if pid == CHILD:
!         apply(os.execlp, (argv[0],) + argv)
      try:
          mode = tty.tcgetattr(STDIN_FILENO)
--- 164,168 ----
      pid, master_fd = fork()
      if pid == CHILD:
!         os.execlp(argv[0], *argv)
      try:
          mode = tty.tcgetattr(STDIN_FILENO)

Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** pydoc.py	16 Feb 2003 01:12:32 -0000	1.77
--- pydoc.py	27 Feb 2003 20:14:39 -0000	1.78
***************
*** 267,274 ****
          """Generate documentation for an object."""
          args = (object, name) + args
!         if inspect.ismodule(object): return apply(self.docmodule, args)
!         if inspect.isclass(object): return apply(self.docclass, args)
!         if inspect.isroutine(object): return apply(self.docroutine, args)
!         return apply(self.docother, args)
  
      def fail(self, object, name=None, *args):
--- 267,274 ----
          """Generate documentation for an object."""
          args = (object, name) + args
!         if inspect.ismodule(object): return self.docmodule(*args)
!         if inspect.isclass(object): return self.docclass(*args)
!         if inspect.isroutine(object): returnself.docroutine(*args)
!         return self.docother(*args)
  
      def fail(self, object, name=None, *args):
***************
*** 380,384 ****
          """Format a section with a big heading."""
          title = '<big><strong>%s</strong></big>' % title
!         return apply(self.section, (title,) + args)
  
      def preformat(self, text):
--- 380,384 ----
          """Format a section with a big heading."""
          title = '<big><strong>%s</strong></big>' % title
!         return self.section(title, *args)
  
      def preformat(self, text):

Index: rexec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rexec.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** rexec.py	6 Jan 2003 15:43:14 -0000	1.47
--- rexec.py	27 Feb 2003 20:14:40 -0000	1.48
***************
*** 49,53 ****
  TEMPLATE = """
  def %s(self, *args):
!         return apply(getattr(self.mod, self.name).%s, args)
  """
  
--- 49,53 ----
  TEMPLATE = """
  def %s(self, *args):
!         return getattr(self.mod, self.name).%s(*args)
  """
  
***************
*** 408,419 ****
          sys.stderr = self.save_stderr
  
!     def s_apply(self, func, args=(), kw=None):
          self.save_files()
          try:
              self.set_files()
!             if kw:
!                 r = apply(func, args, kw)
!             else:
!                 r = apply(func, args)
          finally:
              self.restore_files()
--- 408,416 ----
          sys.stderr = self.save_stderr
  
!     def s_apply(self, func, args=(), kw={}):
          self.save_files()
          try:
              self.set_files()
!             r = func(*args, **kw)
          finally:
              self.restore_files()

Index: robotparser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/robotparser.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** robotparser.py	31 May 2002 14:14:06 -0000	1.16
--- robotparser.py	27 Feb 2003 20:14:40 -0000	1.17
***************
*** 231,235 ****
  class URLopener(urllib.FancyURLopener):
      def __init__(self, *args):
!         apply(urllib.FancyURLopener.__init__, (self,) + args)
          self.errcode = 200
  
--- 231,235 ----
  class URLopener(urllib.FancyURLopener):
      def __init__(self, *args):
!         urllib.FancyURLopener.__init__(self, *args)
          self.errcode = 200
  

Index: sched.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sched.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** sched.py	15 Feb 2001 22:15:13 -0000	1.13
--- sched.py	27 Feb 2003 20:14:41 -0000	1.14
***************
*** 103,106 ****
              else:
                  del q[0]
!                 void = apply(action, argument)
                  self.delayfunc(0)   # Let other threads run
--- 103,106 ----
              else:
                  del q[0]
!                 void = action(*argument)
                  self.delayfunc(0)   # Let other threads run

Index: telnetlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/telnetlib.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** telnetlib.py	9 Nov 2002 05:08:06 -0000	1.22
--- telnetlib.py	27 Feb 2003 20:14:41 -0000	1.23
***************
*** 312,316 ****
          if timeout is not None:
              s_args = s_args + (timeout,)
!         while not self.eof and apply(select.select, s_args) == s_reply:
              i = max(0, len(self.cookedq)-n)
              self.fill_rawq()
--- 312,316 ----
          if timeout is not None:
              s_args = s_args + (timeout,)
!         while not self.eof and select.select(*s_args) == s_reply:
              i = max(0, len(self.cookedq)-n)
              self.fill_rawq()

Index: threading.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** threading.py	30 Dec 2002 23:32:50 -0000	1.31
--- threading.py	27 Feb 2003 20:14:41 -0000	1.32
***************
*** 58,62 ****
  
  def RLock(*args, **kwargs):
!     return apply(_RLock, args, kwargs)
  
  class _RLock(_Verbose):
--- 58,62 ----
  
  def RLock(*args, **kwargs):
!     return _RLock(*args, **kwargs)
  
  class _RLock(_Verbose):
***************
*** 129,133 ****
  
  def Condition(*args, **kwargs):
!     return apply(_Condition, args, kwargs)
  
  class _Condition(_Verbose):
--- 129,133 ----
  
  def Condition(*args, **kwargs):
!     return _Condition(*args, **kwargs)
  
  class _Condition(_Verbose):
***************
*** 241,245 ****
  
  def Semaphore(*args, **kwargs):
!     return apply(_Semaphore, args, kwargs)
  
  class _Semaphore(_Verbose):
--- 241,245 ----
  
  def Semaphore(*args, **kwargs):
!     return _Semaphore(*args, **kwargs)
  
  class _Semaphore(_Verbose):
***************
*** 283,287 ****
  
  def BoundedSemaphore(*args, **kwargs):
!     return apply(_BoundedSemaphore, args, kwargs)
  
  class _BoundedSemaphore(_Semaphore):
--- 283,287 ----
  
  def BoundedSemaphore(*args, **kwargs):
!     return _BoundedSemaphore(*args, **kwargs)
  
  class _BoundedSemaphore(_Semaphore):
***************
*** 298,302 ****
  
  def Event(*args, **kwargs):
!     return apply(_Event, args, kwargs)
  
  class _Event(_Verbose):
--- 298,302 ----
  
  def Event(*args, **kwargs):
!     return _Event(*args, **kwargs)
  
  class _Event(_Verbose):
***************
*** 397,401 ****
      def run(self):
          if self.__target:
!             apply(self.__target, self.__args, self.__kwargs)
  
      def __bootstrap(self):
--- 397,401 ----
      def run(self):
          if self.__target:
!             self.__target(*self.__args, **self.__kwargs)
  
      def __bootstrap(self):

Index: tokenize.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tokenize.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** tokenize.py	5 Nov 2002 06:06:02 -0000	1.34
--- tokenize.py	27 Feb 2003 20:14:42 -0000	1.35
***************
*** 43,48 ****
  
  def group(*choices): return '(' + '|'.join(choices) + ')'
! def any(*choices): return apply(group, choices) + '*'
! def maybe(*choices): return apply(group, choices) + '?'
  
  Whitespace = r'[ \f\t]*'
--- 43,48 ----
  
  def group(*choices): return '(' + '|'.join(choices) + ')'
! def any(*choices): return group(*choices) + '*'
! def maybe(*choices): return group(*choices) + '?'
  
  Whitespace = r'[ \f\t]*'
***************
*** 158,162 ****
  def tokenize_loop(readline, tokeneater):
      for token_info in generate_tokens(readline):
!         apply(tokeneater, token_info)
  
  def generate_tokens(readline):
--- 158,162 ----
  def tokenize_loop(readline, tokeneater):
      for token_info in generate_tokens(readline):
!         tokeneater(*token_info)
  
  def generate_tokens(readline):

Index: trace.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/trace.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** trace.py	19 Feb 2003 02:35:03 -0000	1.2
--- trace.py	27 Feb 2003 20:14:43 -0000	1.3
***************
*** 472,476 ****
              sys.settrace(self.globaltrace)
          try:
!             result = apply(func, args, kw)
          finally:
              if not self.donothing:
--- 472,476 ----
              sys.settrace(self.globaltrace)
          try:
!             result = func(*args, **kw)
          finally:
              if not self.donothing:

Index: unittest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** unittest.py	29 Dec 2002 17:59:23 -0000	1.21
--- unittest.py	27 Feb 2003 20:14:43 -0000	1.22
***************
*** 116,120 ****
      def _exc_info_to_string(self, err):
          """Converts a sys.exc_info()-style tuple of values into a string."""
!         return string.join(apply(traceback.format_exception, err), '')
  
      def __repr__(self):
--- 116,120 ----
      def _exc_info_to_string(self, err):
          """Converts a sys.exc_info()-style tuple of values into a string."""
!         return string.join(traceback.format_exception(*err), '')
  
      def __repr__(self):
***************
*** 277,281 ****
          """
          try:
!             apply(callableObj, args, kwargs)
          except excClass:
              return
--- 277,281 ----
          """
          try:
!             callableObj(*args, **kwargs)
          except excClass:
              return
***************
*** 562,566 ****
  
      def writeln(self, *args):
!         if args: apply(self.write, args)
          self.write('\n') # text-mode streams translate to \r\n if needed
  
--- 562,566 ----
  
      def writeln(self, *args):
!         if args: self.write(*args)
          self.write('\n') # text-mode streams translate to \r\n if needed
  

Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.153
retrieving revision 1.154
diff -C2 -d -r1.153 -r1.154
*** urllib.py	11 Oct 2002 14:36:24 -0000	1.153
--- urllib.py	27 Feb 2003 20:14:43 -0000	1.154
***************
*** 294,298 ****
          if auth: h.putheader('Authorization', 'Basic %s' % auth)
          if realhost: h.putheader('Host', realhost)
!         for args in self.addheaders: apply(h.putheader, args)
          h.endheaders()
          if data is not None:
--- 294,298 ----
          if auth: h.putheader('Authorization', 'Basic %s' % auth)
          if realhost: h.putheader('Host', realhost)
!         for args in self.addheaders: h.putheader(*args)
          h.endheaders()
          if data is not None:
***************
*** 372,376 ****
              if auth: h.putheader('Authorization: Basic %s' % auth)
              if realhost: h.putheader('Host', realhost)
!             for args in self.addheaders: apply(h.putheader, args)
              h.endheaders()
              if data is not None:
--- 372,376 ----
              if auth: h.putheader('Authorization: Basic %s' % auth)
              if realhost: h.putheader('Host', realhost)
!             for args in self.addheaders: h.putheader(*args)
              h.endheaders()
              if data is not None:
***************
*** 542,546 ****
  
      def __init__(self, *args, **kwargs):
!         apply(URLopener.__init__, (self,) + args, kwargs)
          self.auth_cache = {}
          self.tries = 0
--- 542,546 ----
  
      def __init__(self, *args, **kwargs):
!         URLopener.__init__(self, *args, **kwargs)
          self.auth_cache = {}
          self.tries = 0
***************
*** 805,809 ****
          addbase.close(self)
          if self.closehook:
!             apply(self.closehook, self.hookargs)
              self.closehook = None
              self.hookargs = None
--- 805,809 ----
          addbase.close(self)
          if self.closehook:
!             self.closehook(*self.hookargs)
              self.closehook = None
              self.hookargs = None

Index: xdrlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xdrlib.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** xdrlib.py	31 Mar 2002 13:59:18 -0000	1.14
--- xdrlib.py	27 Feb 2003 20:14:45 -0000	1.15
***************
*** 247,251 ****
          print 'pack test', count,
          try:
!             apply(method, args)
              print 'succeeded'
          except ConversionError, var:
--- 247,251 ----
          print 'pack test', count,
          try:
!             method(*args)
              print 'succeeded'
          except ConversionError, var:
***************
*** 273,277 ****
          try:
              if succeedlist[count]:
!                 x = apply(method, args)
                  print pred(x) and 'succeeded' or 'failed', ':', x
              else:
--- 273,277 ----
          try:
              if succeedlist[count]:
!                 x = method(*args)
                  print pred(x) and 'succeeded' or 'failed', ':', x
              else:

Index: xmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xmllib.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** xmllib.py	1 Jun 2002 14:18:47 -0000	1.30
--- xmllib.py	27 Feb 2003 20:14:45 -0000	1.31
***************
*** 810,814 ****
      def __init__(self, **kw):
          self.testdata = ""
!         apply(XMLParser.__init__, (self,), kw)
  
      def handle_xml(self, encoding, standalone):
--- 810,814 ----
      def __init__(self, **kw):
          self.testdata = ""
!         XMLParser.__init__(self, **kw)
  
      def handle_xml(self, encoding, standalone):

Index: xmlrpclib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xmlrpclib.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** xmlrpclib.py	22 Jan 2003 18:17:23 -0000	1.23
--- xmlrpclib.py	27 Feb 2003 20:14:46 -0000	1.24
***************
*** 721,725 ****
              raise ResponseError()
          if self._type == "fault":
!             raise apply(Fault, (), self._stack[0])
          return tuple(self._stack)
  
--- 721,725 ----
              raise ResponseError()
          if self._type == "fault":
!             raise Fault(**self._stack[0])
          return tuple(self._stack)
  
***************
*** 1214,1218 ****
                  )
          else:
!             return apply(HTTPS, (host, None), x509 or {})
  
  ##
--- 1214,1218 ----
                  )
          else:
!             return HTTPS(host, None, **(x509 or {}))
  
  ##