Message217119
I noticed an issue passing in unicode to os.path.relpath.
Specifically that in some cases when passing in unicode I would get back unicode and others I would get back a string. Below I demonstrate the issue. I also attached a patch.
Is this an issue or am I misunderstanding something. Is the patch reasonable? Totally willing to improve and i'll admit I cannot test the ntpath version.
Python 2.7.6 (default, Apr 9 2014, 11:48:52)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.relpath(u'.', u'.')
'.'
>>> os.path.relpath(u'.', u'../')
u'bachmann' |
|
Date |
User |
Action |
Args |
2014-04-24 06:40:22 | Matt.Bachmann | set | recipients:
+ Matt.Bachmann |
2014-04-24 06:40:22 | Matt.Bachmann | set | messageid: <1398321622.3.0.761606734891.issue21343@psf.upfronthosting.co.za> |
2014-04-24 06:40:22 | Matt.Bachmann | link | issue21343 messages |
2014-04-24 06:40:21 | Matt.Bachmann | create | |
|