[issue11344] Add os.path.splitpath(path) function
blokeley
report at bugs.python.org
Fri Apr 29 16:23:45 CEST 2011
blokeley <blokeley at gmail.com> added the comment:
My runtime came from the Python32 Windows installer and I don't have a C compiler on this machine. Therefore I updated to the 3.2 branch in hg and worked on that. This patch is pretty simple so should work on 3.3 without modifications.
I have attached my first iteration of the patch (patched against hg rev 56c187b81d2b).
Disclaimers and suspected issues:
* A path given as a byte array is converted to a string so
splitpath() only returns lists of strings and never lists of
byte arrays. I don't know if splitpath() should return a list
of byte arrays if the path was a byte array. The way split()
is tested implies not. Please advise.
* We might need more tests to cover more path variations on Windows.
* I haven't implemented splitpath() in os2emxpath.py because
I couldn't find test/test_os2emxpath.py or the equivalent.
Please advise if there is one or if I should create one.
Feedback and patches most welcome.
----------
keywords: +patch
Added file: http://bugs.python.org/file21833/issue11344.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11344>
_______________________________________
More information about the Python-bugs-list
mailing list