On Wed, Dec 23, 2015 at 9:08 AM, Nick Coghlan <ncogh...@gmail.com> wrote:
> Within the Python context, the analogy from setattr and setitem at the > Python level to Py_SETREF at the C level is pretty solid, so it likely > makes sense to run with that as "good enough". > > In regards to Py_MOVEREF, while other languages are starting to pay > more attention to "MOVE" semantics, we haven't really done so in > Python yet (moving references in Rust isn't the same thing we're > talking about here - this is just normal runtime reference counting). > Oh. I misunderstood the intent of the macro before (from "The macro moves the ownership"). You are right. Move semantics in C++ and Rust is different. In this case the ownership is not being moved in the same sense as though languages. I withdraw my vote for Py_MOVEREF. Py_SETREF is fine. -- Meador
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com