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

Improve function signatures to use positional-only, positional-or-keyword, or keyword-only parameter #2893

Open
seisman opened this issue Dec 18, 2023 · 0 comments
Labels
discussions Need more discussion before taking further actions

Comments

@seisman
Copy link
Member

seisman commented Dec 18, 2023

Previously mentioned in many places:

Related PEPs:

In short, the new function definition will be like:

def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):
      -----------    ----------     ----------
        |             |                  |
        |        Positional or keyword   |
        |                                - Keyword only
         -- Positional only

Note: Enable ruff's flake8-boolean-trap (FBT) after finishing this request.

@seisman seisman added the discussions Need more discussion before taking further actions label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussions Need more discussion before taking further actions
Projects
None yet
Development

No branches or pull requests

1 participant