/external/python/cpython3/Lib/test/ |
D | test_defaultdict.py | 18 self.assertEqual(d1.default_factory, None) 19 d1.default_factory = list 29 self.assertEqual(d2.default_factory, list) 42 d2.default_factory = None 43 self.assertEqual(d2.default_factory, None) 55 d1.default_factory = list 60 self.assertEqual(d1.default_factory, None) 66 self.assertEqual(d2.default_factory, int) 71 self.assertTrue(d3.default_factory is foo) 100 self.assertEqual(d2.default_factory, None) [all …]
|
D | test_dataclasses.py | 828 x: int=field(default_factory=MISSING) 837 x: int=field(default=MISSING, default_factory=MISSING) 1013 x: ClassVar[int] = field(default_factory=int) 1071 x: InitVar[int] = field(default_factory=int) 1131 y: list = field(default_factory=list) 1146 y: list = field(default_factory=lambda: l) 1160 x: list = field(default_factory=list, repr=False) 1167 x: list = field(default_factory=list, hash=False) 1174 x: list = field(default_factory=list, init=False) 1180 x: list = field(default_factory=list, compare=False) [all …]
|
D | test_sys.py | 971 check(collections.defaultdict.default_factory, size('3PP'))
|
/external/python/cpython2/Lib/test/ |
D | test_defaultdict.py | 18 self.assertEqual(d1.default_factory, None) 19 d1.default_factory = list 29 self.assertEqual(d2.default_factory, list) 42 d2.default_factory = None 43 self.assertEqual(d2.default_factory, None) 55 d1.default_factory = list 60 self.assertEqual(d1.default_factory, None) 66 self.assertEqual(d2.default_factory, int) 71 self.assertTrue(d3.default_factory is foo) 100 self.assertEqual(d2.default_factory, None) [all …]
|
/external/python/cpython3/Lib/ |
D | dataclasses.py | 233 def __init__(self, default, default_factory, init, repr, hash, compare, argument 238 self.default_factory = default_factory 309 def field(*, default=MISSING, default_factory=MISSING, init=True, repr=True, argument 325 if default is not MISSING and default_factory is not MISSING: 327 return Field(default, default_factory, init, repr, hash, compare, 407 if f.default_factory is not MISSING: 411 globals[default_name] = f.default_factory 430 globals[default_name] = f.default_factory 461 if f.default is MISSING and f.default_factory is MISSING: 469 elif f.default_factory is not MISSING: [all …]
|
D | pprint.py | 411 rdf = self._repr(object.default_factory, context, level)
|
/external/python/cpython2/Modules/ |
D | _collectionsmodule.c | 1451 PyObject *default_factory; member 1466 PyObject *factory = dd->default_factory; in defdict_missing() 1497 if (dd->default_factory == NULL) in defdict_copy() 1500 dd->default_factory, dd, NULL); in defdict_copy() 1531 if (dd->default_factory == NULL || dd->default_factory == Py_None) in defdict_reduce() 1534 args = PyTuple_Pack(1, dd->default_factory); in defdict_reduce() 1563 offsetof(defdictobject, default_factory), 0, 1573 Py_CLEAR(dd->default_factory); in defdict_dealloc() 1584 if (dd->default_factory == NULL) { in defdict_print() 1589 PyObject_Print(dd->default_factory, fp, 0); in defdict_print() [all …]
|
/external/tensorflow/tensorflow/python/data/experimental/ops/ |
D | stats_options.py | 57 default_factory=lambda: "") 63 default_factory=lambda: "")
|
/external/tensorflow/tensorflow/python/data/util/ |
D | options.py | 59 def create_option(name, ty, docstring, default_factory=lambda: None): argument 77 option._options[name] = default_factory()
|
D | options_test.py | 30 default_factory=lambda: 42) 32 name="y", ty=float, docstring="a tasty pie", default_factory=lambda: 3.14)
|
/external/python/cpython3/Modules/ |
D | _collectionsmodule.c | 1975 PyObject *default_factory; member 1990 PyObject *factory = dd->default_factory; in defdict_missing() 2021 if (dd->default_factory == NULL) in defdict_copy() 2024 dd->default_factory, dd, NULL); in defdict_copy() 2058 if (dd->default_factory == NULL || dd->default_factory == Py_None) in defdict_reduce() 2061 args = PyTuple_Pack(1, dd->default_factory); in defdict_reduce() 2097 offsetof(defdictobject, default_factory), 0, 2107 Py_CLEAR(dd->default_factory); in defdict_dealloc() 2120 if (dd->default_factory == NULL) in defdict_repr() 2124 int status = Py_ReprEnter(dd->default_factory); in defdict_repr() [all …]
|
/external/python/cpython3/Doc/library/ |
D | dataclasses.rst | 179 .. function:: field(*, default=MISSING, default_factory=MISSING, repr=True, hash=None, init=True, c… 189 mylist: List[int] = field(default_factory=list) 195 detect if the ``default`` and ``default_factory`` parameters are 206 - ``default_factory``: If provided, it must be a zero-argument 210 error to specify both ``default`` and ``default_factory``. 274 - ``default``, ``default_factory``, ``init``, ``repr``, ``hash``, 515 If a :func:`field` specifies a ``default_factory``, it is called with 519 mylist: list = field(default_factory=list) 522 and the field also specifies ``default_factory``, then the default 582 x: list = field(default_factory=list)
|
D | collections.rst | 680 .. class:: defaultdict([default_factory[, ...]]) 687 The first argument provides the initial value for the :attr:`default_factory` 698 If the :attr:`default_factory` attribute is ``None``, this raises a 701 If :attr:`default_factory` is not ``None``, it is called without arguments 705 If calling :attr:`default_factory` raises an exception this exception is 715 :attr:`default_factory`. 721 .. attribute:: default_factory 731 Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy to group a 743 mapping; so an entry is automatically created using the :attr:`~defaultdict.default_factory` 757 Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the [all …]
|
/external/python/cpython2/Doc/library/ |
D | collections.rst | 443 .. class:: defaultdict([default_factory[, ...]]) 450 The first argument provides the initial value for the :attr:`default_factory` 462 If the :attr:`default_factory` attribute is ``None``, this raises a 465 If :attr:`default_factory` is not ``None``, it is called without arguments 469 If calling :attr:`default_factory` raises an exception this exception is 479 :attr:`default_factory`. 485 .. attribute:: default_factory 495 Using :class:`list` as the :attr:`default_factory`, it is easy to group a 507 mapping; so an entry is automatically created using the :attr:`default_factory` 521 Setting the :attr:`default_factory` to :class:`int` makes the [all …]
|
/external/tensorflow/tensorflow/python/data/ops/ |
D | dataset_ops.py | 1979 default_factory=optimization_options.OptimizationOptions) 1987 default_factory=stats_options.StatsOptions) 1995 default_factory=threading_options.ThreadingOptions)
|
/external/python/cpython3/Misc/NEWS.d/ |
D | 3.7.0b3.rst | 190 default_factory would generate an incorrect class.
|
/external/python/cpython2/Misc/NEWS.d/ |
D | 2.6a1.rst | 128 collections.defaultdict, if its default_factory is set to a bound method.
|
/external/python/cpython3/Misc/ |
D | HISTORY | 16942 subclass of collections.defaultdict, if its default_factory is set
|