Message232797
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("http://www.example.com:").port is None
True
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:48 | martin.panter | set | recipients:
+ martin.panter, cvrebert, serhiy.storchaka, chad.birch |
2014-12-17 04:03:48 | martin.panter | set | messageid: <1418789028.15.0.814790104172.issue20059@psf.upfronthosting.co.za> |
2014-12-17 04:03:48 | martin.panter | link | issue20059 messages |
2014-12-17 04:03:47 | martin.panter | create | |
|