Skip to content
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-46838: Syntax error improvements for function definitions #31590

Merged
merged 3 commits into from Mar 22, 2022

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Feb 25, 2022

First round of improvements for function definitions.

https://bugs.python.org/issue46838

…38.RB6kEy.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@pablogsal
Copy link
Member Author

pablogsal commented Feb 25, 2022

Thanks @AlexWaygood !!

@Andykl
Copy link

Andykl commented Feb 26, 2022

It's great that all the points for function defenition have worked out.

  1. Do the new rules apply to lambda function parameters?
  2. What will be for def foo(arg1, */, arg2): pass (*/, not /*)? It looks like this case is not covered.

@pablogsal
Copy link
Member Author

pablogsal commented Mar 3, 2022

  • Do the new rules apply to lambda function parameters?

No, I will add those in another commit

What will be for def foo(arg1, /, arg2): pass (/, not /*)? It looks like this case is not covered.

I left it uncovered because that's going to be quite rare and I think is not worth the extra rule

@pablogsal pablogsal merged commit 7d810b6 into python:main Mar 22, 2022
12 checks passed
@pablogsal pablogsal deleted the bpo-46838 branch Mar 22, 2022
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

5 participants