Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

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).

----------

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

Reply via email to