Pythonistas, what does the following code do?
```
os.path.join(“schema://“, “domain”, “/route“)
```
- ‘schema://domain/route’ (28%, 2 votes)
- ‘/domain/route’ (14%, 1 vote)
- ‘/route’ (42%, 3 votes)
- ‘schema:/domain/route (14%, 1 vote)
7 voters. Poll end: 2 months ago
parvXtl
in reply to nova • • •I would expect first option to be the result but in presence of “absolute” path component, “os.path.join” throws out everything before.
I do not buy the explanation behind that. I have been aware of the misbehavior since fucking behavior bit me earlier.
“pathlib” is also similarly afflicted.
#Python #wart