<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>python 2.5<br>Since it was an indirect suggestion, I thought it belonged here.<br>What should python-list and python-dev both be used for?<br>I know there is an alternative, but why not make it easier?<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Matthieu Brucher <matthieu.brucher@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> L V <somelauw@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> python-list@python.org<br><b><span style="font-weight: bold;">Sent:</span></b> Wednesday, November 5, 2008 7:38:53 PM<br><b><span style="font-weight:
 bold;">Subject:</span></b> Re: [Python-Dev] Why don't range and xrange threat floats as floats?<br></font><br>
2008/11/5 L V <<a ymailto="mailto:somelauw@yahoo.com" href="mailto:somelauw@yahoo.com">somelauw@yahoo.com</a>>:<br>> Why don't range and xrange threat floats as floats?<br>> Is there any good reason range and xrange don't threat floats as floats but<br>> as integers?<br>> When I enter float arguments in a range, the floats are treated as integers.<br>> (+ some warning)<br>><br>> This is how I think it should work:<br>>>>>range(0, 1, 0.1)<br>> [0.0, 0.10000000000000001, 0.20000000000000001, 0.29999999999999999,<br>> 0.40000000000000002, 0.5, 0.59999999999999998, 0.69999999999999996,<br>> 0.80000000000000004, 0.90000000000000002]<br>><br>> I got these results by:<br>>>>>[x/10. for x in xrange(10)]<br>><br>> I'm not looking for alternatives, just for the reason that it works this<br>> way.<br><br>Hi,<br><br>I don't think the Python developers list is th best list to post this<br>kind
 of question.<br><br>What version of Python did you use for this test?<br><br>Matthieu<br>-- <br>Information System Engineer, Ph.D.<br>Website: <a href="http://matthieu-brucher.developpez.com/" target="_blank">http://matthieu-brucher.developpez.com/</a><br>Blogs: <a href="http://matt.eifelle.com" target="_blank">http://matt.eifelle.com</a> and <a href="http://blog.developpez.com/?blog=92" target="_blank">http://blog.developpez.com/?blog=92</a><br>LinkedIn: <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank">http://www.linkedin.com/in/matthieubrucher</a><br></div></div></div><br>

      </body></html>