Skip to content

Comments

bpo-34641: Further restrict the LHS of keyword argument function call syntax.#9212

Merged
benjaminp merged 5 commits intomasterfrom
benjamin-keyword-restriction
Sep 13, 2018
Merged

bpo-34641: Further restrict the LHS of keyword argument function call syntax.#9212
benjaminp merged 5 commits intomasterfrom
benjamin-keyword-restriction

Conversation

@benjaminp
Copy link
Contributor

@benjaminp benjaminp commented Sep 12, 2018

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

The code LGTM. Added just two nitpicks.

Python/ast.c Outdated
return NULL;
}
else if (e->kind != Name_kind) {
} else if (TYPE(expr_node) != NAME) {
Copy link
Member

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

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.

@benjaminp benjaminp merged commit c9a71dd into master Sep 13, 2018
@benjaminp benjaminp deleted the benjamin-keyword-restriction branch September 13, 2018 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants