This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients chad.birch, cvrebert, martin.panter, serhiy.storchaka
Date 2014-12-17.04:03:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I would go for raising ValueError for port numbers out of range. The value of None was already defined to mean that no port is included in the URL.

Also, the ValueError exception should be documented. It is surprising that urlsplit() does not raise any exception, but then simply getting the “port” attribute does raise the exception.

BTW your third example is wrong:

>>> urlparse("").port is None

It’s probably safest to keep this one as it is, but maybe it also needs documenting :)
Date User Action Args
2014-12-17 04:03:48martin.pantersetrecipients: + martin.panter, cvrebert, serhiy.storchaka, chad.birch
2014-12-17 04:03:48martin.pantersetmessageid: <>
2014-12-17 04:03:48martin.panterlinkissue20059 messages
2014-12-17 04:03:47martin.pantercreate