Searched refs:tuple_factory (Results 1 – 3 of 3) sorted by relevance
/third_party/python/Lib/ |
D | dataclasses.py | 1283 def astuple(obj, *, tuple_factory=tuple): argument 1304 return _astuple_inner(obj, tuple_factory) 1307 def _astuple_inner(obj, tuple_factory): argument 1311 value = _astuple_inner(getattr(obj, f.name), tuple_factory) 1313 return tuple_factory(result) 1321 return type(obj)(*[_astuple_inner(v, tuple_factory) for v in obj]) 1326 return type(obj)(_astuple_inner(v, tuple_factory) for v in obj) 1328 return type(obj)((_astuple_inner(k, tuple_factory), _astuple_inner(v, tuple_factory))
|
/third_party/python/Lib/test/ |
D | test_dataclasses.py | 1672 t = astuple(c, tuple_factory=nt) 1674 self.assertIsNot(t, astuple(c, tuple_factory=nt)) 1676 t = astuple(c, tuple_factory=nt) 1692 t = astuple(c, tuple_factory=list)
|
/third_party/python/Doc/library/ |
D | dataclasses.rst | 354 .. function:: astuple(obj, *, tuple_factory=tuple) 357 factory function ``tuple_factory``). Each dataclass is converted
|