Matt Eaton <agnostic...@gmail.com> added the comment:

"Wouldn't we be better off to catch this error at parse time, instead of just 
improve the error message when .port is called?"

I think there could be a case to be made about catching and dealing with this 
error in urlparse() / urlsplit() instead of displaying an error when port 
property is used.  I think that approaching it this way would cut right to the 
problem and alleviate carrying around a potentially bad port value.  However, 
if the port error was caught during parsing but the url, scheme, etc.. values 
were still valid, are we taking away something from the user by raising the 
error too soon?  Just a thought.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to