Skip to content

PEP 591: Why Final params are not allowed? #3102

Closed as not planned
Closed as not planned

Description

@Rudxain

(Apologies in advance if I should ask this question somewhere else)

According to PEP 591:

Final can’t be used in annotations for function arguments

Why was that decision taken? What's the rationale?

I haven't read 100% of that PEP, but I'm pretty sure my question isn't answered anywhere.

I would really love to mark params as immutable! And this would make Py more suitable for purely-functional-programming

Activity

  1. JelleZijlstra commented on Apr 13, 2023

    @JelleZijlstra
    Member

    This question is a better fit for https://github.com/python/typing/discussions.

  2. changed the title [-]Why `Final` params are not allowed?[/-] [+]PEP 591: Why `Final` params are not allowed?[/+] on Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidInvalid issue or PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions