◐ Shell
clean mode source ↗

Message 236471 - Python tracker

Perhaps you actually meant four input slashes, producing two output slashes. That seems more of a bug to me:

>>> urlparse("////foo.com")
ParseResult(scheme='', netloc='', path='//foo.com', params='', query='', fragment='')
>>> urlunparse(_)
'//foo.com'

Solving Issue 22852, which proposes some flags including “has_netloc” on the ParseResult object, might help with this.