Python: confusions with urljoin
<p>I am trying to form URLs from different pieces, and having trouble understanding the behavior of this method. For example:</p>

<pre><code>from urllib.parse import urljoin

&gt;&gt;&gt; urljoin('some', 'thing')
'thing'
&gt;&gt;&gt; urljoin('http://some', 'thing')
'http://some/thing'
&gt;&gt;&gt; urljoin('http://some/more', 'thing')
'http://some/thing'
&gt;&gt;&gt; urljoin('http://some/more/', 'thing') # just a tad / after 'more'
'http://some/more/thing'
urljoin('http://some/more/', '/thing')
'http://some/thing'
</code></pre>

<p>Can you explain the exact behavior of this method?</p>
