Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 13, 2018

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
ast_error(c, chch,
"lambda cannot contain assignment");
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