[Python-checkins] CVS: python/dist/src/Lib nntplib.py,1.25,1.26

Eric S. Raymond esr@users.sourceforge.net
Thu, 08 Feb 2001 23:02:19 -0800


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

Modified Files:
	nntplib.py 
Log Message:
String method conversion.


Index: nntplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/nntplib.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** nntplib.py	2001/02/06 01:07:01	1.25
--- nntplib.py	2001/02/09 07:02:17	1.26
***************
*** 32,36 ****
  import re
  import socket
- import string
  
  __all__ = ["NNTP","NNTPReplyError","NNTPTemporaryError",
--- 32,35 ----
***************
*** 268,272 ****
          for i in range(len(list)):
              # Parse lines into "group last first flag"
!             list[i] = tuple(string.split(list[i]))
          return resp, list
  
--- 267,271 ----
          for i in range(len(list)):
              # Parse lines into "group last first flag"
!             list[i] = tuple(list[i].split())
          return resp, list
  
***************
*** 284,288 ****
          if resp[:3] != '211':
              raise NNTPReplyError(resp)
!         words = string.split(resp)
          count = first = last = 0
          n = len(words)
--- 283,287 ----
          if resp[:3] != '211':
              raise NNTPReplyError(resp)
!         words = resp.split()
          count = first = last = 0
          n = len(words)
***************
*** 294,298 ****
                      last = words[3]
                      if n > 4:
!                         name = string.lower(words[4])
          return resp, count, first, last, name
  
--- 293,297 ----
                      last = words[3]
                      if n > 4:
!                         name = words[4].lower()
          return resp, count, first, last, name
  
***************
*** 308,312 ****
          if resp[:2] != '22':
              raise NNTPReplyError(resp)
!         words = string.split(resp)
          nr = 0
          id = ''
--- 307,311 ----
          if resp[:2] != '22':
              raise NNTPReplyError(resp)
!         words = resp.split()
          nr = 0
          id = ''
***************
*** 415,419 ****
          xover_lines = []
          for line in lines:
!             elem = string.splitfields(line,"\t")
              try:
                  xover_lines.append((elem[0],
--- 414,418 ----
          xover_lines = []
          for line in lines:
!             elem = line.split("\t")
              try:
                  xover_lines.append((elem[0],
***************
*** 422,426 ****
                                      elem[3],
                                      elem[4],
!                                     string.split(elem[5]),
                                      elem[6],
                                      elem[7]))
--- 421,425 ----
                                      elem[3],
                                      elem[4],
!                                     elem[5].split(),
                                      elem[6],
                                      elem[7]))
***************
*** 440,444 ****
          lines = []
          for raw_line in raw_lines:
!             match = line_pat.search(string.strip(raw_line))
              if match:
                  lines.append(match.group(1, 2))
--- 439,443 ----
          lines = []
          for raw_line in raw_lines:
!             match = line_pat.search(raw_line.strip())
              if match:
                  lines.append(match.group(1, 2))
***************
*** 456,460 ****
              raise NNTPReplyError(resp)
          try:
!             [resp_num, path] = string.split(resp)
          except ValueError:
              raise NNTPReplyError(resp)
--- 455,459 ----
              raise NNTPReplyError(resp)
          try:
!             [resp_num, path] = resp.split()
          except ValueError:
              raise NNTPReplyError(resp)
***************
*** 473,477 ****
          if resp[:3] != '111':
              raise NNTPReplyError(resp)
!         elem = string.split(resp)
          if len(elem) != 2:
              raise NNTPDataError(resp)
--- 472,476 ----
          if resp[:3] != '111':
              raise NNTPReplyError(resp)
!         elem = resp.split()
          if len(elem) != 2:
              raise NNTPDataError(resp)