Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ C
Class
C
Lib/test/test_dataclasses/__init__.py:4024–4025 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
4022
# dataclass code is involved in initializing the descriptor.
4023
@dataclass
4024
class
C:
4025
c: int=D()
4026
self.assertEqual(C.c.name,
'cx'
)
4027
4028
# Now test with a default value and init=False, which is the
Callers
nothing calls this directly
Calls
2
field
Function · 0.85
D
Class · 0.70
Tested by
no test coverage detected