Home
last modified time | relevance | path

Searched refs:asdict (Results 1 - 4 of 4) sorted by relevance

/third_party/python/Lib/test/
H A Dtest_dataclasses.py1466 asdict(obj)
1516 # Basic tests for asdict(), it should return a new dictionary.
1523 self.assertEqual(asdict(c), {'x': 1, 'y': 2})
1524 self.assertEqual(asdict(c), asdict(c))
1525 self.assertIsNot(asdict(c), asdict(c))
1527 self.assertEqual(asdict(c), {'x': 42, 'y': 2})
1528 self.assertIs(type(asdict(c)), dict)
1531 # asdict() shoul
[all...]
H A Dpickletester.py1559 def _test_recursive_dict(self, cls, asdict=identity, minprotocol=0):
1567 y = asdict(x)
1578 self._test_recursive_dict(REX_seven, asdict=lambda x: x.table)
1580 def _test_recursive_tuple_and_dict(self, cls, asdict=identity, minprotocol=0):
1590 y = asdict(x[0])
1600 y = asdict(x)
1613 self._test_recursive_tuple_and_dict(REX_seven, asdict=lambda x: x.table)
1615 def _test_recursive_dict_key(self, cls, asdict=identity, minprotocol=0):
1624 y = asdict(x)
1636 self._test_recursive_dict_key(REX_seven, asdict
[all...]
/third_party/mesa3d/bin/pick/
H A Dcore.py125 d: typing.Dict[str, typing.Any] = attr.asdict(self)
/third_party/python/Lib/
H A Ddataclasses.py25 'asdict',
1263 def asdict(obj, *, dict_factory=dict): function
1275 assert asdict(c) == {'x': 1, 'y': 2}
1283 raise TypeError("asdict() should be called on dataclass instances")
1311 # namedtuples, we could no longer call asdict() on a data

Completed in 10 milliseconds