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

Method nt

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

NTClass · 0.85

Tested by

no test coverage detected