> I don't see what that can possible get you that `Struct(x=int, y=str)` doesn't.
Using `Struct(x=int, y=str)` requires a metaclass, where `Struct[x=int, y=str]` does not. On Fri, Aug 14, 2020 at 4:45 PM David Mertz <me...@gnosis.cx> wrote: > On Fri, Aug 14, 2020, 7:39 PM Caleb Donovick > >> class T(Protocol): >> x: int >> y: str >> # with some abuse of notation obviously these would generate unique >> typesassert T == Struct[x=int, y=str] >> >> I don't see what that can possible get you that `Struct(x=int, y=str)` > doesn't. > > I'm +0 on the idea, but I don't think "square brackets look nicer" is > sufficient reason for a change. >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/WYJYCGTXYXU5L7KQJNTGWOSJ6FZ5EDUH/ Code of Conduct: http://python.org/psf/codeofconduct/