diff options
author | willmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f> | 2011-03-24 16:36:44 +0000 |
---|---|---|
committer | willmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f> | 2011-03-24 16:36:44 +0000 |
commit | f016526c75302219b9f35bc1dd443768e25efc61 (patch) | |
tree | 74a1128b630f8a48cc78fb72df09438350866352 /fs/path.py | |
parent | 0266476903fde8cfbfad41fad1a8832357ecb0f3 (diff) | |
download | pyfilesystem-f016526c75302219b9f35bc1dd443768e25efc61.tar.gz |
docstring tweak for basename
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@676 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/path.py')
-rw-r--r-- | fs/path.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -211,7 +211,7 @@ def split(path): def splitext(path): """Splits the extension from the path, and returns the path (up to the last - '.' and the extension + '.' and the extension). :param path: A path to split @@ -268,13 +268,19 @@ def dirname(path): def basename(path): """Returns the basename of the resource referenced by a path. - This is always equivalent to the 'head' component of the value returned + This is always equivalent to the 'tail' component of the value returned by pathsplit(path). :param path: A FS path >>> basename('foo/bar/baz') 'baz' + + >>> basename('foo/bar') + 'bar' + + >>> basename('foo/bar/') + '' """ if '/' not in path: |