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: ...
---------- 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
I'll share the recording and notes after the meetup. [1]
_______________________________________________
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