[New-bugs-announce] [issue11378] os.path.join when second starts with '/' (linux/unix)

Alessandro Forghieri report at bugs.python.org
Wed Mar 2 18:45:03 CET 2011

New submission from Alessandro Forghieri <alf at orion.it>:

Observed behavior:

>>>>>>os.path.join('/foo/bar', '/baz')

Expected behavior:

should return '/foo/bar/baz' or (suboptimally) raise an exception.

Observed beahvior violates the minimal surprise principle and does not appear to respond to any particular rationale (by the same token it could return /foo/bar as well)

components: Library (Lib)
messages: 129906
nosy: al_form2000
priority: normal
severity: normal
status: open
title: os.path.join when second  starts with '/' (linux/unix)
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list