[Python-checkins] python/dist/src/Lib formatter.py,1.20,1.21 ftplib.py,1.69,1.70 gettext.py,1.13,1.14 hmac.py,1.5,1.6
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Fri, 31 May 2002 18:29:18 -0700
- Previous message: [Python-checkins] python/dist/src/Lib ConfigParser.py,1.41,1.42 dis.py,1.38,1.39
- Next message: [Python-checkins] python/dist/src/Lib formatter.py,1.20,1.21
ftplib.py,1.69,1.70 gettext.py,1.13,1.14 hmac.py,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv7374
Modified Files:
formatter.py ftplib.py gettext.py hmac.py
Log Message:
Replace boolean test with is None
Index: formatter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/formatter.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** formatter.py 29 May 2002 16:18:42 -0000 1.20
--- formatter.py 1 Jun 2002 01:29:16 -0000 1.21
***************
*** 39,43 ****
def __init__(self, writer=None):
! if not writer:
writer = NullWriter()
self.writer = writer
--- 39,43 ----
def __init__(self, writer=None):
! if writer is None:
writer = NullWriter()
self.writer = writer
***************
*** 434,438 ****
w = DumbWriter()
f = AbstractFormatter(w)
! if file:
fp = open(file)
elif sys.argv[1:]:
--- 434,438 ----
w = DumbWriter()
f = AbstractFormatter(w)
! if file is not None:
fp = open(file)
elif sys.argv[1:]:
Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** ftplib.py 31 May 2002 14:13:03 -0000 1.69
--- ftplib.py 1 Jun 2002 01:29:16 -0000 1.70
***************
*** 660,664 ****
def __init__(self, filename=None):
! if not filename:
if os.environ.has_key("HOME"):
filename = os.path.join(os.environ["HOME"],
--- 660,664 ----
def __init__(self, filename=None):
! if filename is None:
if os.environ.has_key("HOME"):
filename = os.path.join(os.environ["HOME"],
Index: gettext.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/gettext.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** gettext.py 11 Jan 2002 06:58:49 -0000 1.13
--- gettext.py 1 Jun 2002 01:29:16 -0000 1.14
***************
*** 105,109 ****
self._charset = None
self._fallback = None
! if fp:
self._parse(fp)
--- 105,109 ----
self._charset = None
self._fallback = None
! if fp is not None:
self._parse(fp)
Index: hmac.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/hmac.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** hmac.py 31 May 2002 17:49:10 -0000 1.5
--- hmac.py 1 Jun 2002 01:29:16 -0000 1.6
***************
*** 47,51 ****
self.outer.update(_strxor(key, opad))
self.inner.update(_strxor(key, ipad))
! if (msg):
self.update(msg)
--- 47,51 ----
self.outer.update(_strxor(key, opad))
self.inner.update(_strxor(key, ipad))
! if msg is not None:
self.update(msg)
- Previous message: [Python-checkins] python/dist/src/Lib ConfigParser.py,1.41,1.42 dis.py,1.38,1.39
- Next message: [Python-checkins] python/dist/src/Lib formatter.py,1.20,1.21
ftplib.py,1.69,1.70 gettext.py,1.13,1.14 hmac.py,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]