Without the scheme: //, there is no guarantee that example.com is a domain. You may have an example.com directory. Likewise, you might have the url "omfgroflmao / path / file.ext", how would you know if "omfgroflmao" is a machine on the local network (ie netloc) or should it be a component of the path?
I donβt see that the Python code is actually erroneous, but perhaps the documentation should explicitly indicate the behavior in such ambiguous circumstances (I did not check).
source share