<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Aug 17, 2014 at 5:22 PM, Barry Warsaw <span dir="ltr"><<a href="mailto:barry@python.org" target="_blank">barry@python.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Aug 18, 2014, at 10:08 AM, Nick Coghlan wrote:<br>
<br>
>There's actually another aspect to your idea, independent of the naming:<br>
>exposing a view rather than just an iterator. I'm going to have to look at<br>
>the implications for memoryview, but it may be a good way to go (and would<br>
>align with the iterator -> view changes in dict).<br>
<br>
</div>Yep!  Maybe that will inspire a better spelling. :)<br></blockquote><div><br></div><div>+1. It's just as much about b[i] as it is about "for c in b", so a view sounds right. (The view would have to be mutable for bytearrays and for writable memoryviews.)<br>


<br></div><div>On the rest, it's sounding more and more as if we will just need to live with both bytes(1000) and bytearray(1000). A warning sounds worse than a deprecation to me.<br><br></div><div>bytes.zeros(n) sounds fine to me; I value similar interfaces for bytes and bytearray pretty highly.<br>


<br></div><div>I'm lukewarm on bytes.byte(c); but bytes([c]) does bother me because a size one list is (or at least feels) more expensive to allocate than a size one bytes object. So, okay.<br></div><div> <br></div></div>

-- <br>--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)
</div></div>