Martin v. Löwis wrote: > Andrew Dalke schrieb: >>>>> urlparse.urljoin("http://blah.com/", "..") >> 'http://blah.com/' >>>>> urlparse.urljoin("http://blah.com/", "../") >> 'http://blah.com/../' >>>>> urlparse.urljoin("http://blah.com/", "../..") >> 'http://blah.com/' >> >> Does the result make sense to you? Does it make >> sense that the last of these is shorter than the middle >> one? It sure doesn't to me. I thought it was obvious >> that there was an error; > > That wasn't obvious at all to me. Now looking at the > examples, I agree there is an error. The middle one > is incorrect; > > urlparse.urljoin("http://blah.com/", "../") > > should also give 'http://blah.com/'. make that: could also give 'http://blah.com/'. as I said, today's urljoin doesn't guarantee that the output is the *shortest* possible way to represent the resulting URI. </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4