summaryrefslogtreecommitdiffstats
path: root/Lib/macpath.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-08-16 13:27:45 (GMT)
committerGuido van Rossum <guido@python.org>1991-08-16 13:27:45 (GMT)
commitfbe0a8e0901e145017db0d52fed156869df4d5ea (patch)
tree3943fb325967cc9fe901c1489c3395d3bb953da7 /Lib/macpath.py
parent0b7448020a7b6ff7eb913635b54424989796e467 (diff)
downloadcpython-fbe0a8e0901e145017db0d52fed156869df4d5ea.zip
cpython-fbe0a8e0901e145017db0d52fed156869df4d5ea.tar.gz
cpython-fbe0a8e0901e145017db0d52fed156869df4d5ea.tar.bz2
macpath.cat --> join
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r--Lib/macpath.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 99254ab..58cbb88 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -15,11 +15,11 @@ def isabs(s):
return ':' in s and s[0] <> ':'
-# Concatenate two pathnames.
+# Join two pathnames.
# The result is equivalent to what the second pathname would refer to
# if the first pathname were the current directory.
-def cat(s, t):
+def join(s, t):
if (not s) or isabs(t): return t
if t[:1] = ':': t = t[1:]
if ':' not in s:
@@ -29,9 +29,12 @@ def cat(s, t):
return s + t
+cat = join # For compatibility
+
+
# Split a pathname in two parts: the directory leading up to the final bit,
# and the basename (the filename, without colons, in that directory).
-# The result (s, t) is such that cat(s, t) yields the original argument.
+# The result (s, t) is such that join(s, t) yields the original argument.
def split(s):
if ':' not in s: return '', s