◐ Shell
clean mode source ↗

bpo-34641: Further restrict the LHS of keyword argument function call syntax. by benjaminp · Pull Request #9212 · python/cpython

Conversation

serhiy-storchaka

Choose a reason for hiding this comment

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

The code LGTM. Added just two nitpicks.

return NULL;
}
else if (e->kind != Name_kind) {
} else if (TYPE(expr_node) != NAME) {

Choose a reason for hiding this comment

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

For PEP 7, break a line after "}".

@@ -0,0 +1,2 @@
Further restrict the syntax of the left-hand side of keyword arguments in
function calls. In particular, ``f((arg)=default)`` is now disallowed.

Choose a reason for hiding this comment

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

default looks a bad name. It is not function definition, but a function call.

serhiy-storchaka

@benjaminp benjaminp deleted the benjamin-keyword-restriction branch

September 13, 2018 00:14