I'm getting some curious behaviour parsing when parsing a URL. I was expecting to receive an invalid URL exception, but instead, the hostname of the following URL returns the URL in '[]' brackets:
from urllib.parse import urlparse
print(urlparse('http://myurl.com[notmyurl.com]').hostname)
Output:
>>> notmyurl.com
Is this expected behaviour?
