<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ben Finney wrote:
<blockquote cite="mid87hcd14vo0.fsf@benfinney.id.au" type="cite">
<table class="header-part1" border="0" cellpadding="0" cellspacing="0"
width="100%">
<tbody>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">Subject:
</div>
Re: built in list generator?</td>
</tr>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">From: </div>
Ben Finney <a class="moz-txt-link-rfc2396E" href="mailto:bignose+hates-spam@benfinney.id.au"><bignose+hates-spam@benfinney.id.au></a></td>
</tr>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">Date: </div>
Wed, 14 May 2008 09:43:43 +1000</td>
</tr>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">To: </div>
<a class="moz-txt-link-abbreviated" href="mailto:python-list@python.org">python-list@python.org</a></td>
</tr>
</tbody>
</table>
<table class="header-part2" border="0" cellpadding="0" cellspacing="0"
width="100%">
<tbody>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">To: </div>
<a class="moz-txt-link-abbreviated" href="mailto:python-list@python.org">python-list@python.org</a></td>
</tr>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">Newsgroups:
</div>
comp.lang.python</td>
</tr>
</tbody>
</table>
<br>
<pre wrap="">"Diez B. Roggisch" <a class="moz-txt-link-rfc2396E" href="mailto:deets@nospam.web.de"><deets@nospam.web.de></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">globalrev schrieb:
</pre>
<blockquote type="cite">
<pre wrap="">if i want a list with all numbers between x and y is there a way to
do this with an inbult function.
i mean i can always construct a function to do this but is there
soemthing like:
nbrs = list(range(50,100, 2))
</pre>
</blockquote>
<pre wrap="">range *does* that. use xrange if all you want is to iterate.
</pre>
</blockquote>
<pre wrap=""><!---->
Until Python 3.0, where 'range' returns an iterable.
</pre>
</blockquote>
Is there a thread somewhere of the discussion for this change? I'm
presuming range is used almost exclusively in loops where a change in
the return type would have no negative effect.<br>
--<br>
Ethan<br>
</body>
</html>