@@ -56,7 +56,7 @@ def join(a, *p):
5656
5757def split (p ):
5858 """Split a pathname. Returns tuple "(head, tail)" where "tail" is
59- everything after the final slash. Either part may be empty"""
59+ everything after the final slash. Either part may be empty. """
6060 i = p .rfind ('/' ) + 1
6161 head , tail = p [:i ], p [i :]
6262 if head and head <> '/' * len (head ):
@@ -72,7 +72,7 @@ def split(p):
7272
7373def splitext (p ):
7474 """Split the extension from a pathname. Extension is everything from the
75- last dot to the end. Returns "(root, ext)", either part may be empty"""
75+ last dot to the end. Returns "(root, ext)", either part may be empty. """
7676 root , ext = '' , ''
7777 for c in p :
7878 if c == '/' :
@@ -94,7 +94,7 @@ def splitext(p):
9494
9595def splitdrive (p ):
9696 """Split a pathname into drive and path. On Posix, drive is always
97- empty"""
97+ empty. """
9898 return '' , p
9999
100100
@@ -254,9 +254,9 @@ def ismount(path):
254254
255255def walk (top , func , arg ):
256256 """walk(top,func,arg) calls func(arg, d, files) for each directory "d"
257- in the tree rooted at "top" (including "top" itself). "files" is a list
258- of all the files and subdirs in directory "d".
259- """
257+ in the tree rooted at "top" (including "top" itself). "files" is a list
258+ of all the files and subdirs in directory "d".
259+ """
260260 try :
261261 names = os .listdir (top )
262262 except os .error :
@@ -280,12 +280,12 @@ def walk(top, func, arg):
280280
281281def expanduser (path ):
282282 """Expand ~ and ~user constructions. If user or $HOME is unknown,
283- do nothing"""
283+ do nothing. """
284284 if path [:1 ] <> '~' :
285285 return path
286286 i , n = 1 , len (path )
287287 while i < n and path [i ] <> '/' :
288- i = i + 1
288+ i = i + 1
289289 if i == 1 :
290290 if not os .environ .has_key ('HOME' ):
291291 return path
@@ -297,7 +297,7 @@ def expanduser(path):
297297 except KeyError :
298298 return path
299299 userhome = pwent [5 ]
300- if userhome [- 1 :] == '/' : i = i + 1
300+ if userhome [- 1 :] == '/' : i = i + 1
301301 return userhome + path [i :]
302302
303303
@@ -309,7 +309,7 @@ def expanduser(path):
309309
310310def expandvars (path ):
311311 """Expand shell variables of form $var and ${var}. Unknown variables
312- are left unchanged"""
312+ are left unchanged. """
313313 global _varprog
314314 if '$' not in path :
315315 return path
0 commit comments