[New-bugs-announce] [issue9921] os.path.join('x','') behavior

Radu Grigore report at bugs.python.org
Wed Sep 22 17:22:57 CEST 2010

New submission from Radu Grigore <radugrigore at gmail.com>:

The docs say that "the return value is the concatenation of path1, and optionally path2, etc., with exactly one directory separator (os.sep) inserted between components, unless path2 is empty."

But os.path.join('x','') returns 'x/' in which path1 and path2 *are* separated by exactly one os.sep, even though path2 is empty.

Either the docs or the implementation should be updated.

components: Library (Lib)
messages: 117146
nosy: rgrig
priority: normal
severity: normal
status: open
title: os.path.join('x','') behavior
versions: Python 2.7, Python 3.1

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list