This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年05月18日 19:05 by socketpair, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg136258 - (view) | Author: Марк Коренберг (socketpair) * | Date: 2011年05月18日 19:05 | |
os.path.join('/some/path', '') adds extra slash at end of result. I expect in that case return value should be '/some/path' but not '/some/path/'
|
|||
| msg136331 - (view) | Author: Brian Curtin (brian.curtin) * (Python committer) | Date: 2011年05月19日 19:45 | |
This is intentional. See the implementation of join in Lib/posixpath.py and the Windows implementation in Lib/ntpath.py which also includes a comment explaining why. # path is not empty and does not end with a backslash, # but b is empty; since, e.g., split('a/') produces # ('a', ''), it's best if join() adds a backslash in # this case. |
|||
| msg136351 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2011年05月20日 03:20 | |
See also #9921. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:17 | admin | set | github: 56313 |
| 2011年05月20日 03:20:07 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg136351 resolution: rejected -> duplicate superseder: os.path.join('x','') behavior |
| 2011年05月19日 19:45:52 | brian.curtin | set | status: open -> closed nosy: + brian.curtin messages: + msg136331 resolution: rejected stage: resolved |
| 2011年05月18日 19:05:26 | socketpair | create | |