I have the following python os.path output from ipython
import os.path as path
path.join("/", "tmp")
Out[4]: '/tmp'
path.join("/", "/tmp")
Out[5]: '/tmp'
path.join("abc/", "/tmp")
Out[6]: '/tmp'
path.join("abc", "/tmp")
Out[7]: '/tmp'
path.join("/abc", "/tmp")
Out[8]: '/tmp'
path.join("def", "tmp")
Out[10]: 'def/tmp'
I find outputs 5, 6, 7 and 8 to be counterintuitive. Can somebody please explain if there was a specific reason for this implementation?