MCPcopy Index your code
hub / github.com/python/cpython / custom_dataclass

Method custom_dataclass

Lib/test/test_dataclasses/__init__.py:4593–4596  ·  view source on GitHub ↗
(cls, *args, **kwargs)

Source from the content-addressed store, hash-verified

4591
4592 def test_dataclass_custom_decorator(self):
4593 def custom_dataclass(cls, *args, **kwargs):
4594 dc = dataclass(cls, *args, **kwargs)
4595 dc.__custom__ = True
4596 return dc
4597
4598 C = make_dataclass('C', [('x', int)], decorator=custom_dataclass)
4599 c = C(10)

Callers

nothing calls this directly

Calls 1

dataclassFunction · 0.85

Tested by

no test coverage detected