[issue15342] os.path.join behavior

2012-07-21 Thread R. David Murray
R. David Murray added the comment: I've added the sentence to the docstring, as you suggested. Thanks for the suggestion. -- versions: +Python 3.2, Python 3.3 ___ Python tracker _

[issue15342] os.path.join behavior

2012-07-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 61d0e3526a51 by R David Murray in branch '3.2': #15342: Add clarifying sentence to posixpath.join docstring. http://hg.python.org/cpython/rev/61d0e3526a51 New changeset 30d4d1528b58 by R David Murray in branch 'default': Merge #15342: Add clarifyin

[issue15342] os.path.join behavior

2012-07-15 Thread Yongzhi Pan
Yongzhi Pan added the comment: I suggest append "An empty last part will result in a path that ends with a separator" or something similar to the docstring, though it is already in the HTML documentation. Suppose someone does this like me: In [10]: join('a', sep) Out[10]: '/' He must be su

[issue15342] os.path.join behavior

2012-07-13 Thread R. David Murray
R. David Murray added the comment: Whatever the good or bad points of the API design, it is what it is and has been for a very long time. It is not something that is going to change, because the break in backward compatibility would be too large. What is unclear about the documentation that

[issue15342] os.path.join behavior

2012-07-13 Thread Pan Yongzhi
Pan Yongzhi added the comment: I know this is working as documented. But working as documented does not mean it is not a bug. I cannot deduce that it will append a separator if joining with an empty string from the documentation. Also, this behavior is implicit, and have to guess. Either the

[issue15342] os.path.join behavior

2012-07-12 Thread Ned Deily
Ned Deily added the comment: os.path.join is working as documented. See http://docs.python.org/library/os.path.html#os.path.join "If any component is an absolute path, all previous components (on Windows, including the previous drive letter, if there was one) are thrown away, and joining con

[issue15342] os.path.join behavior

2012-07-12 Thread Pan Yongzhi
New submission from Pan Yongzhi : I am constructing a source directory argument to rsync. It has to end with slash due to rsync behavior. I use: os.path.join('/src/dir', os.path.sep) And run it and realized the source directory becomes '/'. Luckily it is not the destination. Why should join