[Python-checkins] python/dist/src/Lib urllib2.py,1.67,1.68
nnorwitz at users.sourceforge.net
nnorwitz at users.sourceforge.net
Sun Jun 6 23:49:53 EDT 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5276
Modified Files:
urllib2.py
Log Message:
Cleanup: the in operator already returns a bool, no need to bool() it again
Cleanup: use condition to be consistent with code above
CookieJar is in cookielib
Index: urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** urllib2.py 31 May 2004 18:22:40 -0000 1.67
--- urllib2.py 7 Jun 2004 03:49:50 -0000 1.68
***************
*** 264,269 ****
def has_header(self, header_name):
! return bool(header_name in self.headers or
! header_name in self.unredirected_hdrs)
def get_header(self, header_name, default=None):
--- 264,269 ----
def has_header(self, header_name):
! return (header_name in self.headers or
! header_name in self.unredirected_hdrs)
def get_header(self, header_name, default=None):
***************
*** 296,300 ****
if condition.startswith("error"):
! j = meth[i+1:].find("_") + i + 1
kind = meth[j+1:]
try:
--- 296,300 ----
if condition.startswith("error"):
! j = condition.find("_") + i + 1
kind = meth[j+1:]
try:
***************
*** 1027,1031 ****
def __init__(self, cookiejar=None):
if cookiejar is None:
! cookiejar = CookieJar()
self.cookiejar = cookiejar
--- 1027,1031 ----
def __init__(self, cookiejar=None):
if cookiejar is None:
! cookiejar = cookielib.CookieJar()
self.cookiejar = cookiejar
More information about the Python-checkins
mailing list