[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
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

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

Merged
merged 5 commits into from Sep 13, 2018

Conversation

Copy link
Contributor

benjaminp commented Sep 12, 2018

Copy link
Member

serhiy-storchaka left a comment

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

serhiy-storchaka Sep 12, 2018

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

serhiy-storchaka Sep 12, 2018

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 merged commit c9a71dd into master Sep 13, 2018
9 checks passed
benjaminp deleted the benjamin-keyword-restriction branch Sep 13, 2018
yahya-abou-imran pushed a commit to yahya-abou-imran/cpython that referenced this pull request Nov 2, 2018
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.

None yet

4 participants