<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 8, 2013 at 6:04 AM, Daniel Holth <span dir="ltr"><<a href="mailto:dholth@gmail.com" target="_blank">dholth@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On Fri, Mar 8, 2013 at 8:35 AM, Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br>


> Le Fri, 8 Mar 2013 08:18:07 -0500,<br>
> Daniel Holth <<a href="mailto:dholth@gmail.com">dholth@gmail.com</a>> a écrit :<br>
>><br>
>> I am a fan of the proposal. Imagine you are programming for a<br>
>> memory-constrained system. By telling the list how big it needs to be<br>
>> you can save precious RAM.<br>
><br>
> Is it an actual use case or are you just imagining it? :)<br>
> I'm asking because, unless you are only allocating that list and all<br>
> the objects contained it in it already exist, limiting the list's size<br>
> won't do much for the process' memory occupation.<br>
<br>
</div>It might help if it was a list of integers between -1 and 99 and<br>
1-character strings.</blockquote><div><br>That's not what you should use lists for if memory consumption matters. Use <a href="http://docs.python.org/dev/library/array.html">http://docs.python.org/dev/library/array.html</a>, especially if your integers are in such a limited range.<br>

<br>Eli<br><br><br><br><br> <br></div></div><br></div></div>