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

Submission for SC consideration: PEP 677 -- Callable Type Syntax #98

Closed
stroxler opened this issue Jan 24, 2022 · 2 comments
Closed

Submission for SC consideration: PEP 677 -- Callable Type Syntax #98

stroxler opened this issue Jan 24, 2022 · 2 comments

Comments

@stroxler
Copy link

Please consider PEP 677.

This is primarily of interest to users of type checking. It provides a concise way to annotate callable types using an arrow syntax inspired by function headers (and the syntax used by other languages like Typescript and Kotlin).

The PEP has been discussed at length in typing-sig and python-dev.

Since there are many discussions about this, here's a quick summary with links to key threads:

  • In typing-sig [1] [2] there is strong support for this PEP.
    • About 2/3 of typing-sig would have preferred complex syntax supporting named, optional, and variadic args.
      • We discuss this idea in some detail as "Extended Syntax" in our Rejected Alternatives section.
      • We've confirmed that the current proposal is forward-compatible with extended syntax.
    • We proposed this simpler PEP partly because opinions were mixed, but also following guidance in PEP1 to prefer breaking complex changes into focused PEPs.
  • In python-dev [1] [2]. Opinions are mixed.

CC @pradeep90 @gvanrossum

https://www.python.org/dev/peps/pep-0677/

@encukou
Copy link
Member

encukou commented Jan 24, 2022

Thanks! I added it to the SC agenda.

@gpshead
Copy link
Member

gpshead commented Feb 10, 2022

We decided to reject this PEP. Rationale and discussion over in https://mail.python.org/archives/list/python-dev@python.org/thread/NHCLHCU2XCWTBGF732WESMN42YYVKOXB/

@gpshead gpshead closed this as completed Feb 10, 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

No branches or pull requests

3 participants