Hi everyone, the typing community is considering a proposal to add new syntax to support generic types. This is likely to be a big change, so we'd love for any interested core developers to join the discussion early on so we can get alignment faster.
We'll have a video call next Wednesday to discuss the proposal; any core devs (or other interested readers) are welcome to join. (Even if your opinion is "we shouldn't ever do this"—that would be important feedback.)
The proposal is still in its early stages, but it would look something like:
class list[T]: def append(self, obj: T, /) -> None: ... def __getitem__(self, i: int, /) -> T: ...
Replacing the current syntax:
from typing import Generic, TypeVar T = TypeVar("T") class list(Generic[T]): def append(self, obj: T, /) -> None: ... def __getitem__(self, i: int, /) -> T: ...
This is just by way of introduction; I don't want to start a discussion on this list. If you do want to contribute to the discussion but can't join the meeting, please reply to the mailing list thread https://mail.python.org/archives/list/typing-sig@python.org/thread/GPQO2F4NH... .
---------- Forwarded message --------- De: S Pradeep Kumar <gohanpra@gmail.com> Date: mar, 24 may 2022 a las 18:22 Subject: [Typing-sig] Re: Typing Meetup To: Cc: None via Typing-sig <typing-sig@python.org>
*Update*: I'm moving the meetup to* Wednesday, June 1, 11:00 am San Francisco time (UTC-7)* / 7:00 pm London time (UTC+1).
(The main reason for the change is that I want to invite some core dev folks outside of typing-sig, since we'll be discussing a syntax change. I don't want a repeat of Callable syntax :| )
*Agenda*: Syntax for TypeVars, by Sebastian Rittau
Zoom link: https://us02web.zoom.us/j/84291194582. The meeting will be automatically recorded from the time it starts.
I'll share the recording and notes after the meetup. [1]
S Pradeep Kumar
[1]: Meeting recording and notes: https://docs.google.com/document/d/17iqV7WWvB0IwA43EPlIqlUS6Xuvk08X3sEudAA-g...
Typing-sig mailing list -- typing-sig@python.org To unsubscribe send an email to typing-sig-leave@python.org https://mail.python.org/mailman3/lists/typing-sig.python.org/ Member address: jelle.zijlstra@gmail.com