[issue13247] os.path.abspath returns unicode paths as question marks

Terry J. Reedy report at bugs.python.org
Wed Oct 26 02:47:39 CEST 2011


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The doc says "All functions accepting path or file names accept both bytes and string objects, and result in an object of the same type, if a path or file name is returned." It does that now (the encoding assumed or produced for bytes is not specified). It says nothing about raising exceptions in certain situations. So this is a feature change request, one that would likely break existing code.

Users can test for invalid returned paths with "'?' in returned_path", though I admit that the use of '?' as a glob, regex, and url special char makes it a bad choice of error char.

----------
nosy: +terry.reedy
type: behavior -> feature request
versions:  -Python 2.7, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13247>
_______________________________________


More information about the Python-bugs-list mailing list