summaryrefslogtreecommitdiffstats
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-04-07 06:36:23 (GMT)
committerGuido van Rossum <guido@python.org>2002-04-07 06:36:23 (GMT)
commit8ca162f417c6a72faf02831457b4054a73087b78 (patch)
tree2d882f9a1fe596830f47f1132a5294633ba05f33 /Lib/posixpath.py
parentb8bff3f4a9e3be8b43a394d3795a46af2831fe5e (diff)
downloadcpython-8ca162f417c6a72faf02831457b4054a73087b78.zip
cpython-8ca162f417c6a72faf02831457b4054a73087b78.tar.gz
cpython-8ca162f417c6a72faf02831457b4054a73087b78.tar.bz2
Partial introduction of bools where appropriate.
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r--Lib/posixpath.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index cceb2d2..0b984f6 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -158,7 +158,7 @@ def islink(path):
try:
st = os.lstat(path)
except (os.error, AttributeError):
- return 0
+ return False
return stat.S_ISLNK(st[stat.ST_MODE])
@@ -183,7 +183,7 @@ def isdir(path):
try:
st = os.stat(path)
except os.error:
- return 0
+ return False
return stat.S_ISDIR(st[stat.ST_MODE])
@@ -196,7 +196,7 @@ def isfile(path):
try:
st = os.stat(path)
except os.error:
- return 0
+ return False
return stat.S_ISREG(st[stat.ST_MODE])
@@ -335,7 +335,7 @@ def expandvars(path):
import re
_varprog = re.compile(r'\$(\w+|\{[^}]*\})')
i = 0
- while 1:
+ while True:
m = _varprog.search(path, i)
if not m:
break