Author ztane
Recipients rhettinger, serhiy.storchaka, xiang.zhang, ztane
Date 2016-08-08.06:20:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470637208.88.0.08258913982.issue27703@psf.upfronthosting.co.za>
In-reply-to
Content
Normally I wouldn't recommend changing working code. However those asserts would be OK; if either of them is NULL, then the previous if would have had undefined behaviour already. Thus the `XDECREF` wrongly signals that it'd be OK if they were NULLs until this point, which is not true.

I'd rather see more asserts in the code; would be a big aid in possible refactoring; now for example `PyErr_SetObject` checks twice and thrice if either of the arguments is NULL; would be nice to go see the call site and see asserts in place there, showing that the arguments never were NULL to begin with.
History
Date User Action Args
2016-08-08 06:20:08ztanesetrecipients: + ztane, rhettinger, serhiy.storchaka, xiang.zhang
2016-08-08 06:20:08ztanesetmessageid: <1470637208.88.0.08258913982.issue27703@psf.upfronthosting.co.za>
2016-08-08 06:20:08ztanelinkissue27703 messages
2016-08-08 06:20:08ztanecreate