[Python-Dev] New poll about a macro for safe reference replacing
Random832
random832 at fastmail.com
Tue Dec 22 11:03:03 EST 2015
Nick Coghlan <ncoghlan at gmail.com> writes:
> Avoiding those misleading associations is a good argument in favour of
> Py_REPLACE over Py_SETREF - they didn't occur to me before casting my
> votes, and I can definitely see them causing confusion in the future.
>
> So perhaps the combination that makes the most sense is to add
> Py_REPLACE (uses Py_DECREF on destination) & Py_XREPLACE (uses
> Py_XDECREF on destination) to the existing Py_CLEAR?
Is there a strong reason to have an X/plain pair? Py_CLEAR
doesn't seem to have one. This wasn't a subject of the poll.
More information about the Python-Dev
mailing list