Yonatan Goldschmidt <yon.goldschm...@gmail.com> added the comment:

> I don't see how Py_NewRef() or Py_XNewRef() is less error prone. In my 
> experience, any change is more likely to introduce new bugs than leaving the 
> code unchanged.

Agree that inserting changes opens a door to introducing bugs.

However, the "end state" of having Py_NewRef() is desired, I think. It is more 
concise. It is less error prone because where you use it, you literally can't 
miss the "increment refcount" part when stealing a reference from another 
source. Py_INCREF has to come before/after stealing a ref, leaving room for 
error, IMHO.

> In general, we don't accept changes which are only coding style changes.

Didn't know that. Well if that's the case, then obviously there is no reason to 
work specifically on this conversion.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42287>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to