Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ E
Class
E
Lib/test/test_typing.py:2193–2194 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
2191
with
self.assertRaisesRegex(TypeError,
2192
r
'Cannot subclass int \| str'
):
2193
class
E(Union[int, str]):
2194
pass
2195
2196
def
test_cannot_instantiate(self):
2197
with
self.assertRaises(TypeError):
Callers
2
test_no_inheritance_from_nominal
Method · 0.70
test_protocols_pickleable
Method · 0.70
Calls
no outgoing calls
Tested by
2
test_no_inheritance_from_nominal
Method · 0.56
test_protocols_pickleable
Method · 0.56