<br><br><div><span class="gmail_quote">On 10/11/07, <b class="gmail_sendername">Gregory P. Smith</b> &lt;<a href="mailto:greg@krypto.org">greg@krypto.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Guido -<br><br>One tiny question has come up while working on this one:<br><br>Should the PyBytes buffer (mutable bytes) object&#39;s .append(val) and .remove(val) methods accept anything other than an int in the 0..255 range?
<br><br>I believe the answer to be no based on the previous long thread on this but these two weren&#39;t mentioned at the time so i figure I&#39;ll ask.&nbsp; Should a pep3118 buffer api supporting object that produces a length 1 buffer also work for append and remove?&nbsp; That would allow .append(b&#39;!&#39;) or .remove(b&#39;!&#39;).
</blockquote><div><br>I&#39;m doubly assuming &#39;no&#39; now as the .insert() method would also need it for consistancy which just be plain gross to allow .insert(5, b&#39;x&#39;) to work but .insert(5, b&#39;xyz&#39;) to fail with a ValueError.&nbsp; Consider the question unasked unless you want a different answer.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">amusingly right now in 3.0a1 there is a bug where .append(&#39;33&#39;) will happily append a b&#39;!&#39; by converting it into an int then into a byte.&nbsp; regardless of the answer that misbehavior will be zapped in the patch i&#39;m about to submit. ;)
<br><span class="sg"><br>-gps</span><div><span class="e" id="q_1158e13639e1006b_2"><br><br><div><span class="gmail_quote">On 10/8/07, <b class="gmail_sendername">Gregory P. Smith</b> &lt;<a href="mailto:greg@krypto.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
greg@krypto.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div><span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">- add missing methods to PyBytes (for list, see the PEP and compare to
<br>what&#39;s already there)
<br><br></blockquote></span></div></blockquote></div><br>
</span></div></blockquote></div><br>