[Python-Dev] Py_SETREF vs. Py_XSETREF
Armin Rigo
arigo at tunes.org
Sun Apr 3 10:00:39 EDT 2016
More information about the Python-Dev mailing list
Sun Apr 3 10:00:39 EDT 2016
- Previous message (by thread): [Python-Dev] Py_SETREF vs. Py_XSETREF
- Next message (by thread): [Python-Dev] Py_SETREF vs. Py_XSETREF
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, On 3 April 2016 at 15:29, MRAB <python at mrabarnett.plus.com> wrote: >> Should we rename Py_SETREF to Py_XSETREF and introduce new Py_SETREF >> that uses Py_DECREF? > > Checking for NULL is convenient (and safer), but, on the other hand, it > _would_ be consistent with the others. My 2 cents would be to call the new macro Py_XSETREF for consistency, at least, whether you decide to go with two macros or not. Otherwise it's kind of obvious that if you add Py_SETREF that checks for nulls, in 2 or 3 releases people will really want a "fast" variant anyway, and there will be no consistent name for that. A bientôt, Armin.
- Previous message (by thread): [Python-Dev] Py_SETREF vs. Py_XSETREF
- Next message (by thread): [Python-Dev] Py_SETREF vs. Py_XSETREF
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list