[issue9921] os.path.join('x','') behavior

Brian Brazil report at bugs.python.org
Thu Sep 23 21:14:51 CEST 2010


Brian Brazil <brian.brazil at gmail.com> added the comment:

The behaviour is a bit more nuanced:
>>> os.path.join('x', '')
'x/'
>>> os.path.join('x', '', 'y')
'x/y'
>>> os.path.join('x', '', 'y', '', '')
'x/y/'
>>> os.path.join('', 'x')
'x'

I'm unsure how to word this best, maybe "non-trailing empty paths are ignored"?

----------
nosy: +bbrazil

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9921>
_______________________________________


More information about the Python-bugs-list mailing list