Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ D
Class
D
Lib/test/test_typing.py:303–304 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
301
with
self.assertRaisesRegex(TypeError,
302
r
'Cannot subclass typing\.Self'
):
303
class
D(Self):
304
pass
305
306
def
test_cannot_init(self):
307
with
self.assertRaises(TypeError):
Callers
7
test_basic_protocol
Method · 0.70
test_no_inheritance_from_nominal
Method · 0.70
test_non_protocol_subclasses
Method · 0.70
test_none_treated_correctly
Method · 0.70
test_collections_protocols_allowed
Method · 0.70
test_parameterized_slots_dict
Method · 0.70
test_total
Method · 0.70
Calls
no outgoing calls
Tested by
7
test_basic_protocol
Method · 0.56
test_no_inheritance_from_nominal
Method · 0.56
test_non_protocol_subclasses
Method · 0.56
test_none_treated_correctly
Method · 0.56
test_collections_protocols_allowed
Method · 0.56
test_parameterized_slots_dict
Method · 0.56
test_total
Method · 0.56