homepage

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 martin.panter
Date 2015年02月09日.04:03:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1423454637.96.0.780742641159.issue23416@psf.upfronthosting.co.za>
In-reply-to
Content
This would be a simple API enhancement and would allow easier building of URLs, like
>>> SplitResult("rtp", address, query=urlencode(query)).geturl()
"rtp://localhost:5004?rtcpport=5005"
It seems the best way to do this at the moment is annoyingly verbose:
SplitResult("rtp", address, path="", query=urlencode(query), fragment="").geturl()
The way hinted by the documentation can leave an ugly empty query string:
>>> query = ()
>>> "rtp://%s?%s" % (address, urlencode(query))
"rtp://localhost:5004?"
This enhancement would also allow easy parsing of usernames, ports, etc:
>>> SplitResult(netloc="[::1]:0").hostname
"::1"
>>> SplitResult(netloc="[::1]:0").port
0
Looking at the code, I think this could be implemented by adding an explicit constructor to each of the concrete classes, with arguments defaulting to "" or b"" as appropriate.
History
Date User Action Args
2015年02月09日 04:03:58martin.pantersetrecipients: + martin.panter
2015年02月09日 04:03:57martin.pantersetmessageid: <1423454637.96.0.780742641159.issue23416@psf.upfronthosting.co.za>
2015年02月09日 04:03:57martin.panterlinkissue23416 messages
2015年02月09日 04:03:57martin.pantercreate

AltStyle によって変換されたページ (->オリジナル) /