Created
September 20, 2017 08:17
-
-
Save mitsuhiko/3b51ffa6598bc3b744a6470bd42b9068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> def join(doc, other): | |
... return os.path.join(os.path.dirname(doc), other) | |
... | |
>>> join('foo/index.html', 'other.html') | |
'foo/other.html' | |
>>> join('foo/', 'other.html') | |
'foo/other.html' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment