]> granicus.if.org Git - python/commit
Easy optimizations of urlparse for the common case of parsing an http URL.
authorJeremy Hylton <jeremy@alum.mit.edu>
Wed, 2 Sep 1998 21:53:16 +0000 (21:53 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Wed, 2 Sep 1998 21:53:16 +0000 (21:53 +0000)
commitb85c8479eb0dd25968eceabf599c0c4616a3c59a
treeb3786c069d4c17a82728ae034d7bea07caa17393
parentf6ae743cb53a2953c7fb063963ec48029206c8b0
Easy optimizations of urlparse for the common case of parsing an http URL.

1. use dict.get instead of try/except KeyError
2. if the url scheme is 'http' then avoid the series of
   'if var in [someseq]:'.  instead, inline all of the code.
3. find = string.find
Lib/urlparse.py