New submission from Evan Driscoll <eva...@gmail.com>: The documentation for os.path.split says, in part:
"In nearly all cases, join(head, tail) equals path (the only exception being when there were multiple slashes separating head from tail)." But this is not quite true: that's not the *only* exception, at least without a somewhat liberal definition of "equals". This can also happen if os.altsep is used in the path being split, in which case it will be replaced by os.sep: >>> import ntpath >>> path = "a/b" >>> (head, tail) = ntpath.split(path) >>> joined = ntpath.join(head, tail) >>> joined == path False >>> joined 'a\\b' [I only selected the versions that I actually verified, but I would guess it's present in more.] ---------- assignee: georg.brandl components: Documentation messages: 92180 nosy: evaned, georg.brandl severity: normal status: open title: Minor documentation bug with os.path.split versions: Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6825> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com