strange xrange() behavior in Python 2
<p>I am familiar with the difference between <code>range()</code> and <code>xrange()</code>. I noticed something weird with <code>xrange()</code>:</p>

<pre><code>&gt;&gt;&gt; xrange(1,10,2)
xrange(1, 11, 2)

&gt;&gt;&gt; xrange(1,10,4)
xrange(1, 13, 4)
</code></pre>

<p>Functionally, it is correct:</p>

<pre><code>&gt;&gt;&gt; for item in xrange(1,10,4):
...     print item
... 
1
5
9
&gt;&gt;&gt;
</code></pre>

<p>However, as you can see, the stop value in the returned <code>xrange</code> object is the next higher value after the last legal value. Any reason why?</p>

<p><code>range()</code> which now provides the same functionality in Python 3 as <code>xrange</code> in Python 2 behaves as expected:</p>

<pre><code>&gt;&gt;&gt; range(1,10,4)
range(1, 10, 4)
&gt;&gt;&gt; range(1,10,2)
range(1, 10, 2)
&gt;&gt;&gt; 
</code></pre>
