[Python-checkins] CVS: python/dist/src/Lib BaseHTTPServer.py,1.19,1.20 CGIHTTPServer.py,1.22,1.23 ConfigParser.py,1.39,1.40 SocketServer.py,1.29,1.30 asyncore.py,1.31,1.32 bdb.py,1.37,1.38 cgi.py,1.70,1.71 code.py,1.20,1.21 dospath.py,1.25,1.26 filecmp.py,1.10,1.11 getopt.py,1.16,1.17 macpath.py,1.33,1.34 mailbox.py,1.35,1.36 mhlib.py,1.28,1.29 mutex.py,1.9,1.10 ntpath.py,1.45,1.46 os.py,1.54,1.55 os2emxpath.py,1.1,1.2 posixpath.py,1.46,1.47 pydoc.py,1.60,1.61 robotparser.py,1.13,1.14 symtable.py,1.5,1.6 tabnanny.py,1.17,1.18 threading.py,1.21,1.22 webbrowser.py,1.29,1.30
Tim Peters
tim_one@users.sourceforge.net
Thu, 04 Apr 2002 14:56:00 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Modules cgen.py,2.15,2.16
- Next message: [Python-checkins] CVS: python/dist/src/Tools/idle EditorWindow.py,1.39,1.40 IOBinding.py,1.4,1.5 ObjectBrowser.py,1.3,1.4 PyShell.py,1.35,1.36 ReplaceDialog.py,1.4,1.5 SearchDialog.py,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv18060/python/Lib
Modified Files:
BaseHTTPServer.py CGIHTTPServer.py ConfigParser.py
SocketServer.py asyncore.py bdb.py cgi.py code.py dospath.py
filecmp.py getopt.py macpath.py mailbox.py mhlib.py mutex.py
ntpath.py os.py os2emxpath.py posixpath.py pydoc.py
robotparser.py symtable.py tabnanny.py threading.py
webbrowser.py
Log Message:
Convert a pile of obvious "yes/no" functions to return bool.
Index: BaseHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/BaseHTTPServer.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** BaseHTTPServer.py 17 Mar 2002 18:37:22 -0000 1.19
--- BaseHTTPServer.py 4 Apr 2002 22:55:58 -0000 1.20
***************
*** 223,227 ****
self.headers.
! Return value is 1 for success, 0 for failure; on failure, an
error is sent back.
--- 223,227 ----
self.headers.
! Return True for success, False for failure; on failure, an
error is sent back.
***************
*** 240,249 ****
if version[:5] != 'HTTP/':
self.send_error(400, "Bad request version (%s)" % `version`)
! return 0
try:
version_number = float(version.split('/', 1)[1])
except ValueError:
self.send_error(400, "Bad request version (%s)" % `version`)
! return 0
if version_number >= 1.1 and self.protocol_version >= "HTTP/1.1":
self.close_connection = 0
--- 240,249 ----
if version[:5] != 'HTTP/':
self.send_error(400, "Bad request version (%s)" % `version`)
! return False
try:
version_number = float(version.split('/', 1)[1])
except ValueError:
self.send_error(400, "Bad request version (%s)" % `version`)
! return False
if version_number >= 1.1 and self.protocol_version >= "HTTP/1.1":
self.close_connection = 0
***************
*** 251,255 ****
self.send_error(505,
"Invalid HTTP Version (%f)" % version_number)
! return 0
elif len(words) == 2:
[command, path] = words
--- 251,255 ----
self.send_error(505,
"Invalid HTTP Version (%f)" % version_number)
! return False
elif len(words) == 2:
[command, path] = words
***************
*** 258,267 ****
self.send_error(400,
"Bad HTTP/0.9 request type (%s)" % `command`)
! return 0
elif not words:
! return 0
else:
self.send_error(400, "Bad request syntax (%s)" % `requestline`)
! return 0
self.command, self.path, self.request_version = command, path, version
--- 258,267 ----
self.send_error(400,
"Bad HTTP/0.9 request type (%s)" % `command`)
! return False
elif not words:
! return False
else:
self.send_error(400, "Bad request syntax (%s)" % `requestline`)
! return False
self.command, self.path, self.request_version = command, path, version
***************
*** 284,288 ****
self.protocol_version >= "HTTP/1.1"):
self.close_connection = 0
! return 1
def handle_one_request(self):
--- 284,288 ----
self.protocol_version >= "HTTP/1.1"):
self.close_connection = 0
! return True
def handle_one_request(self):
Index: CGIHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/CGIHTTPServer.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** CGIHTTPServer.py 23 Mar 2002 05:47:31 -0000 1.22
--- CGIHTTPServer.py 4 Apr 2002 22:55:58 -0000 1.23
***************
*** 87,92 ****
if path[:i] == x and (not path[i:] or path[i] == '/'):
self.cgi_info = path[:i], path[i+1:]
! return 1
! return 0
cgi_directories = ['/cgi-bin', '/htbin']
--- 87,92 ----
if path[:i] == x and (not path[i:] or path[i] == '/'):
self.cgi_info = path[:i], path[i+1:]
! return True
! return False
cgi_directories = ['/cgi-bin', '/htbin']
Index: ConfigParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** ConfigParser.py 8 Mar 2002 18:08:47 -0000 1.39
--- ConfigParser.py 4 Apr 2002 22:55:58 -0000 1.40
***************
*** 375,381 ****
if self.__sections.has_key(section):
del self.__sections[section]
! return 1
else:
! return 0
#
--- 375,381 ----
if self.__sections.has_key(section):
del self.__sections[section]
! return True
else:
! return False
#
Index: SocketServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/SocketServer.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** SocketServer.py 23 Oct 2001 21:42:45 -0000 1.29
--- SocketServer.py 4 Apr 2002 22:55:58 -0000 1.30
***************
*** 227,234 ****
"""Verify the request. May be overridden.
! Return true if we should proceed with this request.
"""
! return 1
def process_request(self, request, client_address):
--- 227,234 ----
"""Verify the request. May be overridden.
! Return True if we should proceed with this request.
"""
! return True
def process_request(self, request, client_address):
Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** asyncore.py 4 Apr 2002 21:02:24 -0000 1.31
--- asyncore.py 4 Apr 2002 22:55:58 -0000 1.32
***************
*** 282,286 ****
def readable (self):
! return 1
if os.name == 'mac':
--- 282,286 ----
def readable (self):
! return True
if os.name == 'mac':
***************
*** 291,295 ****
else:
def writable (self):
! return 1
# ==================================================
--- 291,295 ----
else:
def writable (self):
! return True
# ==================================================
Index: bdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bdb.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** bdb.py 31 Mar 2002 14:06:41 -0000 1.37
--- bdb.py 4 Apr 2002 22:55:58 -0000 1.38
***************
*** 93,112 ****
def stop_here(self, frame):
if self.stopframe is None:
! return 1
if frame is self.stopframe:
! return 1
while frame is not None and frame is not self.stopframe:
if frame is self.botframe:
! return 1
frame = frame.f_back
! return 0
def break_here(self, frame):
filename = self.canonic(frame.f_code.co_filename)
if not self.breaks.has_key(filename):
! return 0
lineno = frame.f_lineno
if not lineno in self.breaks[filename]:
! return 0
# flag says ok to delete temp. bp
(bp, flag) = effective(filename, lineno, frame)
--- 93,112 ----
def stop_here(self, frame):
if self.stopframe is None:
! return True
if frame is self.stopframe:
! return True
while frame is not None and frame is not self.stopframe:
if frame is self.botframe:
! return True
frame = frame.f_back
! return False
def break_here(self, frame):
filename = self.canonic(frame.f_code.co_filename)
if not self.breaks.has_key(filename):
! return False
lineno = frame.f_lineno
if not lineno in self.breaks[filename]:
! return False
# flag says ok to delete temp. bp
(bp, flag) = effective(filename, lineno, frame)
***************
*** 115,121 ****
if (flag and bp.temporary):
self.do_clear(str(bp.number))
! return 1
else:
! return 0
def do_clear(self, arg):
--- 115,121 ----
if (flag and bp.temporary):
self.do_clear(str(bp.number))
! return True
else:
! return False
def do_clear(self, arg):
Index: cgi.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** cgi.py 23 Mar 2002 05:50:17 -0000 1.70
--- cgi.py 4 Apr 2002 22:55:58 -0000 1.71
***************
*** 601,606 ****
raise TypeError, "not indexable"
for item in self.list:
! if item.name == key: return 1
! return 0
def __len__(self):
--- 601,606 ----
raise TypeError, "not indexable"
for item in self.list:
! if item.name == key: return True
! return False
def __len__(self):
Index: code.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/code.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** code.py 25 Mar 2002 22:04:23 -0000 1.20
--- code.py 4 Apr 2002 22:55:58 -0000 1.21
***************
*** 67,71 ****
also handles run-time exceptions, except for SystemExit).
! The return value is 1 in case 2, 0 in the other cases (unless
an exception is raised). The return value can be used to
decide whether to use sys.ps1 or sys.ps2 to prompt the next
--- 67,71 ----
also handles run-time exceptions, except for SystemExit).
! The return value is True in case 2, False in the other cases (unless
an exception is raised). The return value can be used to
decide whether to use sys.ps1 or sys.ps2 to prompt the next
***************
*** 78,90 ****
# Case 1
self.showsyntaxerror(filename)
! return 0
if code is None:
# Case 2
! return 1
# Case 3
self.runcode(code)
! return 0
def runcode(self, code):
--- 78,90 ----
# Case 1
self.showsyntaxerror(filename)
! return False
if code is None:
# Case 2
! return True
# Case 3
self.runcode(code)
! return False
def runcode(self, code):
Index: dospath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** dospath.py 10 Oct 2001 04:16:20 -0000 1.25
--- dospath.py 4 Apr 2002 22:55:58 -0000 1.26
***************
*** 152,157 ****
st = os.stat(path)
except os.error:
! return 0
! return 1
--- 152,157 ----
st = os.stat(path)
except os.error:
! return False
! return True
***************
*** 162,166 ****
st = os.stat(path)
except os.error:
! return 0
return stat.S_ISDIR(st[stat.ST_MODE])
--- 162,166 ----
st = os.stat(path)
except os.error:
! return False
return stat.S_ISDIR(st[stat.ST_MODE])
***************
*** 172,176 ****
st = os.stat(path)
except os.error:
! return 0
return stat.S_ISREG(st[stat.ST_MODE])
--- 172,176 ----
st = os.stat(path)
except os.error:
! return False
return stat.S_ISREG(st[stat.ST_MODE])
Index: filecmp.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/filecmp.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** filecmp.py 20 Jan 2001 23:34:12 -0000 1.10
--- filecmp.py 4 Apr 2002 22:55:58 -0000 1.11
***************
*** 36,40 ****
Return value:
! integer -- 1 if the files are the same, 0 otherwise.
This function uses a cache for past comparisons and the results,
--- 36,40 ----
Return value:
! True if the files are the same, False otherwise.
This function uses a cache for past comparisons and the results,
***************
*** 51,59 ****
s2 = _sig(stat_function(f2))
if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG:
! return 0
if shallow and s1 == s2:
! return 1
if s1[1] != s2[1]:
! return 0
result = _cache.get((f1, f2))
--- 51,59 ----
s2 = _sig(stat_function(f2))
if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG:
! return False
if shallow and s1 == s2:
! return True
if s1[1] != s2[1]:
! return False
result = _cache.get((f1, f2))
Index: getopt.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/getopt.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** getopt.py 12 Dec 2001 06:20:34 -0000 1.16
--- getopt.py 4 Apr 2002 22:55:58 -0000 1.17
***************
*** 104,110 ****
# Is there an exact match?
if opt in possibilities:
! return 0, opt
elif opt + '=' in possibilities:
! return 1, opt
# No exact match, so better be unique.
if len(possibilities) > 1:
--- 104,110 ----
# Is there an exact match?
if opt in possibilities:
! return False, opt
elif opt + '=' in possibilities:
! return True, opt
# No exact match, so better be unique.
if len(possibilities) > 1:
Index: macpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/macpath.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** macpath.py 31 Mar 2002 14:06:41 -0000 1.33
--- macpath.py 4 Apr 2002 22:55:58 -0000 1.34
***************
*** 140,150 ****
def exists(s):
! """Return true if the pathname refers to an existing file or directory."""
try:
st = os.stat(s)
except os.error:
! return 0
! return 1
# Return the longest prefix of all list elements.
--- 140,150 ----
def exists(s):
! """Return True if the pathname refers to an existing file or directory."""
try:
st = os.stat(s)
except os.error:
! return False
! return True
# Return the longest prefix of all list elements.
Index: mailbox.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mailbox.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** mailbox.py 24 Mar 2002 01:38:38 -0000 1.35
--- mailbox.py 4 Apr 2002 22:55:58 -0000 1.36
***************
*** 152,156 ****
def _portable_isrealfromline(self, line):
! return 1
_isrealfromline = _strict_isrealfromline
--- 152,156 ----
def _portable_isrealfromline(self, line):
! return True
_isrealfromline = _strict_isrealfromline
Index: mhlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mhlib.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** mhlib.py 17 Oct 2001 05:59:26 -0000 1.28
--- mhlib.py 4 Apr 2002 22:55:58 -0000 1.29
***************
*** 851,856 ****
def contains(self, x):
for lo, hi in self.pairs:
! if lo <= x <= hi: return 1
! return 0
def append(self, x):
--- 851,856 ----
def contains(self, x):
for lo, hi in self.pairs:
! if lo <= x <= hi: return True
! return False
def append(self, x):
Index: mutex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mutex.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** mutex.py 18 Feb 2001 03:30:53 -0000 1.9
--- mutex.py 4 Apr 2002 22:55:58 -0000 1.10
***************
*** 25,34 ****
def testandset(self):
"""Atomic test-and-set -- grab the lock if it is not set,
! return true if it succeeded."""
if not self.locked:
self.locked = 1
! return 1
else:
! return 0
def lock(self, function, argument):
--- 25,34 ----
def testandset(self):
"""Atomic test-and-set -- grab the lock if it is not set,
! return True if it succeeded."""
if not self.locked:
self.locked = 1
! return True
else:
! return False
def lock(self, function, argument):
Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** ntpath.py 17 Jan 2002 00:44:26 -0000 1.45
--- ntpath.py 4 Apr 2002 22:55:58 -0000 1.46
***************
*** 247,252 ****
st = os.stat(path)
except os.error:
! return 0
! return 1
--- 247,252 ----
st = os.stat(path)
except os.error:
! return False
! return True
Index: os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** os.py 15 Mar 2002 10:21:59 -0000 1.54
--- os.py 4 Apr 2002 22:55:58 -0000 1.55
***************
*** 446,452 ****
try:
eval(name)
! return 1
except NameError:
! return 0
# Supply spawn*() (probably only for Unix)
--- 446,452 ----
try:
eval(name)
! return True
except NameError:
! return False
# Supply spawn*() (probably only for Unix)
Index: os2emxpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os2emxpath.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** os2emxpath.py 24 Feb 2002 05:32:32 -0000 1.1
--- os2emxpath.py 4 Apr 2002 22:55:58 -0000 1.2
***************
*** 206,211 ****
st = os.stat(path)
except os.error:
! return 0
! return 1
--- 206,211 ----
st = os.stat(path)
except os.error:
! return False
! return True
Index: posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** posixpath.py 10 Oct 2001 04:16:20 -0000 1.46
--- posixpath.py 4 Apr 2002 22:55:58 -0000 1.47
***************
*** 167,176 ****
def exists(path):
! """Test whether a path exists. Returns false for broken symbolic links"""
try:
st = os.stat(path)
except os.error:
! return 0
! return 1
--- 167,176 ----
def exists(path):
! """Test whether a path exists. Returns False for broken symbolic links"""
try:
st = os.stat(path)
except os.error:
! return False
! return True
***************
*** 238,251 ****
s2 = os.stat(join(path, '..'))
except os.error:
! return 0 # It doesn't exist -- so not a mount point :-)
dev1 = s1[stat.ST_DEV]
dev2 = s2[stat.ST_DEV]
if dev1 != dev2:
! return 1 # path/.. on a different device as path
ino1 = s1[stat.ST_INO]
ino2 = s2[stat.ST_INO]
if ino1 == ino2:
! return 1 # path/.. is the same i-node as path
! return 0
--- 238,251 ----
s2 = os.stat(join(path, '..'))
except os.error:
! return False # It doesn't exist -- so not a mount point :-)
dev1 = s1[stat.ST_DEV]
dev2 = s2[stat.ST_DEV]
if dev1 != dev2:
! return True # path/.. on a different device as path
ino1 = s1[stat.ST_INO]
ino2 = s2[stat.ST_INO]
if ino1 == ino2:
! return True # path/.. is the same i-node as path
! return False
Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** pydoc.py 24 Mar 2002 23:11:21 -0000 1.60
--- pydoc.py 4 Apr 2002 22:55:58 -0000 1.61
***************
*** 149,153 ****
for ext in ['.py', '.pyc', '.pyo']:
if os.path.isfile(os.path.join(path, '__init__' + ext)):
! return 1
def synopsis(filename, cache={}):
--- 149,154 ----
for ext in ['.py', '.pyc', '.pyo']:
if os.path.isfile(os.path.join(path, '__init__' + ext)):
! return True
! return False
def synopsis(filename, cache={}):
Index: robotparser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/robotparser.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** robotparser.py 18 Mar 2002 10:43:18 -0000 1.13
--- robotparser.py 4 Apr 2002 22:55:58 -0000 1.14
***************
*** 135,141 ****
(useragent, url))
if self.disallow_all:
! return 0
if self.allow_all:
! return 1
# search for given user agent matches
# the first match counts
--- 135,141 ----
(useragent, url))
if self.disallow_all:
! return False
if self.allow_all:
! return True
# search for given user agent matches
# the first match counts
***************
*** 148,152 ****
return self.default_entry.allowance(url)
# agent not found ==> access granted
! return 1
--- 148,152 ----
return self.default_entry.allowance(url)
# agent not found ==> access granted
! return True
***************
*** 196,204 ****
if agent=='*':
# we have the catch-all agent
! return 1
agent = agent.lower()
if useragent.find(agent) != -1:
! return 1
! return 0
def allowance(self, filename):
--- 196,204 ----
if agent=='*':
# we have the catch-all agent
! return True
agent = agent.lower()
if useragent.find(agent) != -1:
! return True
! return False
def allowance(self, filename):
Index: symtable.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/symtable.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** symtable.py 12 Jul 2001 22:36:02 -0000 1.5
--- symtable.py 4 Apr 2002 22:55:58 -0000 1.6
***************
*** 36,52 ****
newSymbolTable = SymbolTableFactory()
- def bool(x):
- """Helper to force boolean result to 1 or 0"""
- if x:
- return 1
- return 0
-
def is_free(flags):
if (flags & (USE | DEF_FREE)) \
and (flags & (DEF_LOCAL | DEF_PARAM | DEF_GLOBAL)):
! return 1
if flags & DEF_FREE_CLASS:
! return 1
! return 0
class SymbolTable:
--- 36,46 ----
newSymbolTable = SymbolTableFactory()
def is_free(flags):
if (flags & (USE | DEF_FREE)) \
and (flags & (DEF_LOCAL | DEF_PARAM | DEF_GLOBAL)):
! return True
if flags & DEF_FREE_CLASS:
! return True
! return False
class SymbolTable:
***************
*** 207,214 ****
if (self.__flags & (USE | DEF_FREE)) \
and (self.__flags & (DEF_LOCAL | DEF_PARAM | DEF_GLOBAL)):
! return 1
if self.__flags & DEF_FREE_CLASS:
! return 1
! return 0
def is_imported(self):
--- 201,208 ----
if (self.__flags & (USE | DEF_FREE)) \
and (self.__flags & (DEF_LOCAL | DEF_PARAM | DEF_GLOBAL)):
! return True
if self.__flags & DEF_FREE_CLASS:
! return True
! return False
def is_imported(self):
Index: tabnanny.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tabnanny.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** tabnanny.py 31 Mar 2002 13:59:18 -0000 1.17
--- tabnanny.py 4 Apr 2002 22:55:58 -0000 1.18
***************
*** 197,201 ****
return a
! # Return true iff self.indent_level(t) < other.indent_level(t)
# for all t >= 1.
# The algorithm is due to Vincent Broman.
--- 197,201 ----
return a
! # Return True iff self.indent_level(t) < other.indent_level(t)
# for all t >= 1.
# The algorithm is due to Vincent Broman.
***************
*** 212,216 ****
def less(self, other):
if self.n >= other.n:
! return 0
if self.is_simple and other.is_simple:
return self.nt <= other.nt
--- 212,216 ----
def less(self, other):
if self.n >= other.n:
! return False
if self.is_simple and other.is_simple:
return self.nt <= other.nt
***************
*** 220,225 ****
for ts in range(2, n+1):
if self.indent_level(ts) >= other.indent_level(ts):
! return 0
! return 1
# return a list of tuples (ts, i1, i2) such that
--- 220,225 ----
for ts in range(2, n+1):
if self.indent_level(ts) >= other.indent_level(ts):
! return False
! return True
# return a list of tuples (ts, i1, i2) such that
Index: threading.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** threading.py 19 Feb 2002 03:01:36 -0000 1.21
--- threading.py 4 Apr 2002 22:55:58 -0000 1.22
***************
*** 175,181 ****
if self.__lock.acquire(0):
self.__lock.release()
! return 0
else:
! return 1
def wait(self, timeout=None):
--- 175,181 ----
if self.__lock.acquire(0):
self.__lock.release()
! return False
else:
! return True
def wait(self, timeout=None):
Index: webbrowser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** webbrowser.py 15 Mar 2002 13:47:32 -0000 1.29
--- webbrowser.py 4 Apr 2002 22:55:58 -0000 1.30
***************
*** 79,91 ****
def _iscommand(cmd):
! """Return true if cmd can be found on the executable search path."""
path = os.environ.get("PATH")
if not path:
! return 0
for d in path.split(os.pathsep):
exe = os.path.join(d, cmd)
if os.path.isfile(exe):
! return 1
! return 0
--- 79,91 ----
def _iscommand(cmd):
! """Return True if cmd can be found on the executable search path."""
path = os.environ.get("PATH")
if not path:
! return False
for d in path.split(os.pathsep):
exe = os.path.join(d, cmd)
if os.path.isfile(exe):
! return True
! return False
- Previous message: [Python-checkins] CVS: python/dist/src/Modules cgen.py,2.15,2.16
- Next message: [Python-checkins] CVS: python/dist/src/Tools/idle EditorWindow.py,1.39,1.40 IOBinding.py,1.4,1.5 ObjectBrowser.py,1.3,1.4 PyShell.py,1.35,1.36 ReplaceDialog.py,1.4,1.5 SearchDialog.py,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]