MCPcopy Index your code
hub / github.com/RustPython/RustPython / nt

Method nt

Lib/test/test_dataclasses/__init__.py:1915–1916  ·  view source on GitHub ↗
(lst)

Source from the content-addressed store, hash-verified

1913 y: int
1914 NT = namedtuple('NT', 'x y')
1915 def nt(lst):
1916 return NT(*lst)
1917 c = C(1, 2)
1918 t = astuple(c, tuple_factory=nt)
1919 self.assertEqual(t, NT(1, 2))

Callers

nothing calls this directly

Calls 1

NTClass · 0.85

Tested by

no test coverage detected