bpo-27535: Cleanup create_filter() by vstinner · Pull Request #4516 · python/cpython
Conversation
create_filter() now expects the action as a _Py_Identifier which
avoids string comparison, and more important, to avoid handling the
"unknown action" annoying case.
create_filter() now expects the action as a _Py_Identifier which avoids string comparison, and more important, to avoid handling the "unknown action" annoying case.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be possible to replace PyList_SET_ITEM() and create_filter() with a single function or macro and return NULL immediately after error.
| } | ||
|
|
||
| for (x = 0; x < pos; x += 1) { | ||
| for (size_t x = 0; x < pos; x += 1) { |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x++
It could be possible to replace PyList_SET_ITEM() and create_filter() with a single function or macro and return NULL immediately after error.
Maybe, I don't know. I prefer to write a minimum change.
ghost
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters