Serhiy Storchaka added the comment:

In Python 2 str is coerced to unicode, so most functions should return the same 
(or compatible) result for str and unicode argument if it contains only 7-bit 
ASCII characters. Of course there are several obvious exceptions, such as 
type() or repr(). And presumably there are several bugs.

Apparently the actual bug in your case is that 
os.path.relpath(u'test_srcl.txt', u'.') and os.path.relpath(u'test_srcl.txt', 
'.') return totally different results.

What are os.getcwd(), os.getcwdu(), ntpath.abspath(ntpath.normpath(p)) for p in 
[u'test_srcl.txt', 'test_srcl.txt', u'.', '.'] in your case?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to