diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-11-22 22:51:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-22 22:51:42 (GMT) |
commit | 82656276caf4cb889193572d2d14dbc5f3d2bdff (patch) | |
tree | 19060972ab524aa7962ca411f079cfa14ec614fa /PC/getpathp.c | |
parent | bb11c3c967afaf263e00844d4ab461b7fafd6d36 (diff) | |
download | cpython-82656276caf4cb889193572d2d14dbc5f3d2bdff.zip cpython-82656276caf4cb889193572d2d14dbc5f3d2bdff.tar.gz cpython-82656276caf4cb889193572d2d14dbc5f3d2bdff.tar.bz2 |
bpo-27535: Optimize warnings.warn() (#4508)
* Optimize warnings.filterwarnings(). Replace re.compile('') with
None to avoid the cost of calling a regex.match() method, whereas
it always matchs.
* Optimize get_warnings_attr(): replace PyObject_GetAttrString() with
_PyObject_GetAttrId().
Cleanup also create_filter():
* Use _Py_IDENTIFIER() to allow to cleanup strings at Python
finalization
* Replace Py_FatalError() with a regular exceptions
Diffstat (limited to 'PC/getpathp.c')
0 files changed, 0 insertions, 0 deletions