Skip to content

bpo-27535: Cleanup create_filter()#4516

Merged
vstinner merged 2 commits intopython:masterfrom
vstinner:create_filter
Nov 23, 2017
Merged

bpo-27535: Cleanup create_filter()#4516
vstinner merged 2 commits intopython:masterfrom
vstinner:create_filter

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Nov 23, 2017

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.
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

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) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x++

@vstinner
Copy link
Copy Markdown
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants