<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 23, 2015 at 9:08 AM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Within the Python context, the analogy from setattr and setitem at the<br>
Python level to Py_SETREF at the C level is pretty solid, so it likely<br>
makes sense to run with that as "good enough".<br>
<br>
In regards to Py_MOVEREF, while other languages are starting to pay<br>
more attention to "MOVE" semantics, we haven't really done so in<br>
Python yet (moving references in Rust isn't the same thing we're<br>
talking about here - this is just normal runtime reference counting).<br></blockquote><div><br></div><div>Oh.  I misunderstood the intent of the macro before</div><div>(from "<span style="font-size:12.8px">The macro moves the ownership")</span>.  You are right. <br></div><div>Move semantics in C++ and Rust is different.<br></div><div>In this case the ownership is not being moved in the same</div><div>sense as though languages.<br></div><div><br></div><div>I withdraw my vote for Py_MOVEREF.  Py_SETREF is fine.</div><div><br></div><div>-- Meador</div></div>
</div></div>