Paul Everitt on Nostr: Hey Python typing folks. Let's say I have a dataclass with a field called target. The ...
Hey Python typing folks. Let's say I have a dataclass with a field called target. The value is a typing.Protocol…not an object that matches the Protocol, but the protocol itself.
What's the type hint? (If you say typing._ProtocolMeta then you have some ‘splaining to do.)
Published at
2024-08-31 14:03:52Event JSON
{
"id": "e60575a649f482f46856902156e4636ae768e71f2294ed818d7724f2473ee56b",
"pubkey": "839e8dcb6f12cc4d136c4b9688e7d284837a43b8a8d450b1c9d97011e9299cfa",
"created_at": 1725113032,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/users/pauleveritt/statuses/113057007678457840",
"activitypub"
]
],
"content": "Hey Python typing folks. Let's say I have a dataclass with a field called target. The value is a typing.Protocol…not an object that matches the Protocol, but the protocol itself.\n\nWhat's the type hint? (If you say typing._ProtocolMeta then you have some ‘splaining to do.)",
"sig": "b9695042fd2ca8bcc9b9f236438b22fdf50059d79c5086acf9bc74e4095a5354d44ed7a4d693de2dcfebffdaa19fce843468921e02eb0bc4fb7f336b8cc34127"
}