commit | b85c8479eb0dd25968eceabf599c0c4616a3c59a | [log] [tgz] |
---|---|---|
author | Jeremy Hylton <jeremy@alum.mit.edu> | Wed Sep 02 21:53:16 1998 +0000 |
committer | Jeremy Hylton <jeremy@alum.mit.edu> | Wed Sep 02 21:53:16 1998 +0000 |
tree | b3786c069d4c17a82728ae034d7bea07caa17393 | |
parent | f6ae743cb53a2953c7fb063963ec48029206c8b0 [diff] |
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