◐ Shell
clean mode source ↗

bpo-27535: Cleanup create_filter() by vstinner · Pull Request #4516 · python/cpython

Conversation

@vstinner

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.

https://bugs.python.org/issue27535

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.

serhiy-storchaka

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++

@vstinner

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 ghost mentioned this pull request

Sep 12, 2022

Labels