[Python-checkins] python/dist/src/Lib sgmllib.py,1.40,1.41 shlex.py,1.16,1.17 shutil.py,1.20,1.21 smtplib.py,1.55,1.56 sre_compile.py,1.41,1.42 sre_parse.py,1.54,1.55

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Sat, 01 Jun 2002 17:40:07 -0700


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

Modified Files:
	sgmllib.py shlex.py shutil.py smtplib.py sre_compile.py 
	sre_parse.py 
Log Message:
Replace boolean test with is None.

Index: sgmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sgmllib.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** sgmllib.py	1 Jun 2002 14:18:46 -0000	1.40
--- sgmllib.py	2 Jun 2002 00:40:04 -0000	1.41
***************
*** 480,484 ****
      import sys
  
!     if not args:
          args = sys.argv[1:]
  
--- 480,484 ----
      import sys
  
!     if args is None:
          args = sys.argv[1:]
  

Index: shlex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shlex.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** shlex.py	17 Apr 2001 17:20:19 -0000	1.16
--- shlex.py	2 Jun 2002 00:40:05 -0000	1.17
***************
*** 13,17 ****
      "A lexical analyzer class for simple shell-like syntaxes."
      def __init__(self, instream=None, infile=None):
!         if instream:
              self.instream = instream
              self.infile = infile
--- 13,17 ----
      "A lexical analyzer class for simple shell-like syntaxes."
      def __init__(self, instream=None, infile=None):
!         if instream is not None:
              self.instream = instream
              self.infile = infile
***************
*** 48,52 ****
          self.lineno = 1
          if self.debug:
!             if newfile:
                  print 'shlex: pushing to file %s' % (self.infile,)
              else:
--- 48,52 ----
          self.lineno = 1
          if self.debug:
!             if newfile is not None:
                  print 'shlex: pushing to file %s' % (self.infile,)
              else:
***************
*** 189,195 ****
      def error_leader(self, infile=None, lineno=None):
          "Emit a C-compiler-like, Emacs-friendly error-message leader."
!         if not infile:
              infile = self.infile
!         if not lineno:
              lineno = self.lineno
          return "\"%s\", line %d: " % (infile, lineno)
--- 189,195 ----
      def error_leader(self, infile=None, lineno=None):
          "Emit a C-compiler-like, Emacs-friendly error-message leader."
!         if infile is None:
              infile = self.infile
!         if lineno is None:
              lineno = self.lineno
          return "\"%s\", line %d: " % (infile, lineno)

Index: shutil.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shutil.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** shutil.py	15 Feb 2001 22:15:13 -0000	1.20
--- shutil.py	2 Jun 2002 00:40:05 -0000	1.21
***************
*** 123,127 ****
              if ignore_errors:
                  pass
!             elif onerror:
                  onerror(cmd[0], cmd[1], exc)
              else:
--- 123,127 ----
              if ignore_errors:
                  pass
!             elif onerror is not None:
                  onerror(cmd[0], cmd[1], exc)
              else:

Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** smtplib.py	1 Jun 2002 14:18:46 -0000	1.55
--- smtplib.py	2 Jun 2002 00:40:05 -0000	1.56
***************
*** 237,241 ****
              if code != 220:
                  raise SMTPConnectError(code, msg)
!         if local_hostname:
              self.local_hostname = local_hostname
          else:
--- 237,241 ----
              if code != 220:
                  raise SMTPConnectError(code, msg)
!         if local_hostname is not None:
              self.local_hostname = local_hostname
          else:

Index: sre_compile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** sre_compile.py	4 Sep 2001 19:10:20 -0000	1.41
--- sre_compile.py	2 Jun 2002 00:40:05 -0000	1.42
***************
*** 146,150 ****
      # compile charset subprogram
      emit = code.append
!     if not fixup:
          fixup = lambda x: x
      for op, av in _optimize_charset(charset, fixup):
--- 146,150 ----
      # compile charset subprogram
      emit = code.append
!     if fixup is None:
          fixup = lambda x: x
      for op, av in _optimize_charset(charset, fixup):

Index: sre_parse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** sre_parse.py	1 Jun 2002 14:18:46 -0000	1.54
--- sre_parse.py	2 Jun 2002 00:40:05 -0000	1.55
***************
*** 81,85 ****
          gid = self.groups
          self.groups = gid + 1
!         if name:
              ogid = self.groupdict.get(name, None)
              if ogid is not None:
--- 81,85 ----
          gid = self.groups
          self.groups = gid + 1
!         if name is not None:
              ogid = self.groupdict.get(name, None)
              if ogid is not None:
***************
*** 98,102 ****
      def __init__(self, pattern, data=None):
          self.pattern = pattern
!         if not data:
              data = []
          self.data = data
--- 98,102 ----
      def __init__(self, pattern, data=None):
          self.pattern = pattern
!         if data is None:
              data = []
          self.data = data