Author serhiy.storchaka
Recipients serhiy.storchaka, vstinner
Date 2018-12-13.07:13:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544685195.88.0.788709270274.issue35459@psf.upfronthosting.co.za>
In-reply-to
Content
Most of changes are straightforward. Just replaced PyDict_GetItem*() with PyDict_GetItem*WithError() and added the check for PyErr_Occurred(). PyDict_GetItemString() with constant argument was replaced with _PyDict_GetItemIdWithError() for performance.

Some code was left unchanged. This was mostly in files where errors are very and error checking is not performed or errors are silenced in any case (Python/compile.c, Python/symtable.c, Objects/structseq.c, etc). These cases needed separate issues.

The most non-trivial change is in Objects/typeobject.c. The check for duplicated descriptors (in add_methods(), add_members() and add_getset()) was moved after creating the descriptor object. This improves performance by avoiding to create a temporary string objects. Duplicate descriptor names is a very uncommon case -- there were only two cases in the stdlib (besides tests), and one of them already is fixed (PR 11053).
History
Date User Action Args
2018-12-13 07:13:15serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner
2018-12-13 07:13:15serhiy.storchakasetmessageid: <1544685195.88.0.788709270274.issue35459@psf.upfronthosting.co.za>
2018-12-13 07:13:15serhiy.storchakalinkissue35459 messages
2018-12-13 07:13:15serhiy.storchakacreate