Home
last modified time | relevance | path

Searched refs:default_factory (Results 1 – 25 of 34) sorted by relevance

12

/external/python/cpython3/Lib/test/
Dtest_defaultdict.py18 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 …]
Dtest_dataclasses.py53 x: int = field(default=1, default_factory=int)
848 x: int=field(default_factory=MISSING)
857 x: int=field(default=MISSING, default_factory=MISSING)
1033 x: ClassVar[int] = field(default_factory=int)
1091 x: InitVar[int] = field(default_factory=int)
1159 y: list = field(default_factory=list)
1174 y: list = field(default_factory=lambda: l)
1188 x: list = field(default_factory=list, repr=False)
1195 x: list = field(default_factory=list, hash=False)
1202 x: list = field(default_factory=list, init=False)
[all …]
/external/python/cpython2/Lib/test/
Dtest_defaultdict.py18 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/
Ddataclasses.py244 def __init__(self, default, default_factory, init, repr, hash, compare, argument
249 self.default_factory = default_factory
322 def field(*, default=MISSING, default_factory=MISSING, init=True, repr=True, argument
338 if default is not MISSING and default_factory is not MISSING:
340 return Field(default, default_factory, init, repr, hash, compare,
421 if f.default_factory is not MISSING:
425 globals[default_name] = f.default_factory
444 globals[default_name] = f.default_factory
475 if f.default is MISSING and f.default_factory is MISSING:
483 elif f.default_factory is not MISSING:
[all …]
/external/tensorflow/tensorflow/python/data/experimental/ops/
Dstats_options.py58 default_factory=lambda: "")
64 default_factory=lambda: "")
Ddistribute_options.py137 default_factory=lambda: AutoShardPolicy.AUTO)
Doptimization_options.py196 default_factory=MapVectorizationOptions)
/external/python/cpython2/Modules/
D_collectionsmodule.c1451 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/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/time/internal/cctz/src/
Dzone_info_source.cc66 extern ZoneInfoSourceFactory default_factory;
67 ZoneInfoSourceFactory default_factory = DefaultFactory; variable
/external/webrtc/third_party/abseil-cpp/absl/time/internal/cctz/src/
Dzone_info_source.cc66 extern ZoneInfoSourceFactory default_factory;
67 ZoneInfoSourceFactory default_factory = DefaultFactory; variable
/external/openscreen/third_party/abseil/src/absl/time/internal/cctz/src/
Dzone_info_source.cc66 extern ZoneInfoSourceFactory default_factory;
67 ZoneInfoSourceFactory default_factory = DefaultFactory; variable
/external/angle/third_party/abseil-cpp/absl/time/internal/cctz/src/
Dzone_info_source.cc66 extern ZoneInfoSourceFactory default_factory;
67 ZoneInfoSourceFactory default_factory = DefaultFactory; variable
/external/libtextclassifier/abseil-cpp/absl/time/internal/cctz/src/
Dzone_info_source.cc66 extern ZoneInfoSourceFactory default_factory;
67 ZoneInfoSourceFactory default_factory = DefaultFactory; variable
/external/abseil-cpp/absl/time/internal/cctz/src/
Dzone_info_source.cc66 extern ZoneInfoSourceFactory default_factory;
67 ZoneInfoSourceFactory default_factory = DefaultFactory; variable
/external/tensorflow/tensorflow/c/eager/
Dc_api_unified_experimental.cc42 static tracing::FactoryFunction default_factory; variable
54 default_factory = GetFactories().find(name)->second; in SetDefaultTracingEngine()
76 if (default_factory) { in CreateTracingExecutionContext()
77 return default_factory(fn_name, s); in CreateTracingExecutionContext()
/external/tensorflow/tensorflow/python/data/util/
Doptions.py77 def create_option(name, ty, docstring, default_factory=lambda: None): argument
95 option._options[name] = default_factory()
Doptions_test.py30 default_factory=lambda: 42)
32 name="y", ty=float, docstring="a tasty pie", default_factory=lambda: 3.14)
Dstructure.py450 ctor = lambda items: type(element)(element.default_factory, items)
/external/python/cpython3/Modules/
D_collectionsmodule.c1959 PyObject *default_factory; member
1974 PyObject *factory = dd->default_factory; in defdict_missing()
1999 dd->default_factory ? dd->default_factory : Py_None, arg, NULL); in new_defdict()
2045 if (dd->default_factory == NULL || dd->default_factory == Py_None) in defdict_reduce()
2048 args = PyTuple_Pack(1, dd->default_factory); in defdict_reduce()
2086 offsetof(defdictobject, default_factory), 0,
2096 Py_CLEAR(dd->default_factory); in defdict_dealloc()
2109 if (dd->default_factory == NULL) in defdict_repr()
2113 int status = Py_ReprEnter(dd->default_factory); in defdict_repr()
2122 defrepr = PyObject_Repr(dd->default_factory); in defdict_repr()
[all …]
/external/python/cpython3/Doc/library/
Ddataclasses.rst181 .. function:: field(*, default=MISSING, default_factory=MISSING, repr=True, hash=None, init=True, c…
191 mylist: list[int] = field(default_factory=list)
197 detect if the ``default`` and ``default_factory`` parameters are
208 - ``default_factory``: If provided, it must be a zero-argument
212 error to specify both ``default`` and ``default_factory``.
276 - ``default``, ``default_factory``, ``init``, ``repr``, ``hash``,
517 If a :func:`field` specifies a ``default_factory``, it is called with
521 mylist: list = field(default_factory=list)
524 and the field also specifies ``default_factory``, then the default
584 x: list = field(default_factory=list)
Dcollections.rst688 .. class:: defaultdict([default_factory[, ...]])
695 The first argument provides the initial value for the :attr:`default_factory`
706 If the :attr:`default_factory` attribute is ``None``, this raises a
709 If :attr:`default_factory` is not ``None``, it is called without arguments
713 If calling :attr:`default_factory` raises an exception this exception is
723 :attr:`default_factory`.
729 .. attribute:: default_factory
743 Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy to group a
755 mapping; so an entry is automatically created using the :attr:`~defaultdict.default_factory`
769 Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the
[all …]
/external/python/cpython2/Doc/library/
Dcollections.rst443 .. 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/util/
Dnest.py164 d = _collections.defaultdict(instance.default_factory)
/external/tensorflow/tensorflow/python/data/ops/
Ddataset_ops.py3009 default_factory=distribute_options.DistributeOptions)
3017 default_factory=optimization_options.OptimizationOptions)
3034 default_factory=stats_options.StatsOptions)
3042 default_factory=threading_options.ThreadingOptions)
/external/tensorflow/tensorflow/python/keras/
Dbackend.py6646 def __init__(self, default_factory): argument
6647 self.default_factory = default_factory
6697 value = self[key] = self.default_factory() # pylint:disable=not-callable
6707 default = self.default_factory(**kwargs)

12