8000 Rephrase: "`Callable` now supports `[]`. See `PEP585` and `types-genericalias`" · Issue #98507 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Rephrase: "Callable now supports []. See PEP585 and types-genericalias" #98507

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

Closed
sobolevn opened this issue Oct 21, 2022 · 3 comments
Closed
Assignees
Labels
docs Documentation in the Doc dir topic-typing

Comments

@sobolevn
Copy link
Member

I think it would be better to say: "Callable now supports __class_getitem__. See PEP585 and types-genericalias"

Because it is not quite clear what [] is:

  • empty list?
  • slices?
  • __getitem__ operator?
  • __class_getitem__ method?

I will send a PR.

@Fidget-Spinner
Copy link
Member

__class_getitem__ has its own problems too - unless you're aware of typing internals, no one knows what it is. Users also won't understand the implications.

It might be better to say Now supports subscripting ([]).

@sobolevn
Copy link
Member Author

Done :)

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 24, 2022
…pports subscripting" (pythonGH-98508)

(cherry picked from commit e3b9dd8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 24, 2022
…pports subscripting" (pythonGH-98508)

(cherry picked from commit e3b9dd8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington added a commit that referenced this issue Oct 24, 2022
… subscripting" (GH-98508)

(cherry picked from commit e3b9dd8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington added a commit that referenced this issue Oct 24, 2022
… subscripting" (GH-98508)

(cherry picked from commit e3b9dd8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@AlexWaygood
Copy link
Member

Thanks @sobolevn!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-typing
Projects
None yet
Development

No branches or pull requests

3 participants
0