def urljoin(*urls):
return reduce(_urljoin, [u.strip('<STR_LIT:/>')+'<STR_LIT:/>' for u in urls if u.strip('<STR_LIT:/>')], '<STR_LIT>').rstrip('<STR_LIT:/>')<EOL>
The default urlparse.urljoin behavior look strange
Standard urlparse.urljoin('http://a.com/foo', '/bar')
Expect: http://a.com/foo/bar
Actually: http://a.com/bar

This function fix that.