This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, brett.cannon, georg.brandl, larry, loewis, pitrou, rhettinger, serhiy.storchaka, skrah, vstinner
Date 2014-02-02.13:53:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391349208.63.0.515963951654.issue20440@psf.upfronthosting.co.za>
In-reply-to
Content
> I think Raymond's original concern still applies: The macros do add to the learning curve.

I agree. But alternative solution is Victor's original patch which replaces potential bugs by inlined body of Py_REPLACE/Py_XREPLACE. This is explicit, but more verbose (2 lines are replaced by 5 lines with one new variable, with macros it would be one line), less clear and more errorprone.

I believe that given the popularity of such a code and the possibility of mistakes, it is worth introducing special macros. Here apply the same reasoning as for Py_CLEAR.

Of course these macros shouldn't be a part of stable API in 2.7 and 3.3 (and may be even in 3.4).
History
Date User Action Args
2014-02-02 13:53:28serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, brett.cannon, georg.brandl, rhettinger, pitrou, vstinner, larry, benjamin.peterson, skrah
2014-02-02 13:53:28serhiy.storchakasetmessageid: <1391349208.63.0.515963951654.issue20440@psf.upfronthosting.co.za>
2014-02-02 13:53:28serhiy.storchakalinkissue20440 messages
2014-02-02 13:53:28serhiy.storchakacreate