Home
last modified time | relevance | path

Searched refs:kw_only (Results 1 – 5 of 5) sorted by relevance

/third_party/python/Lib/
Ddataclasses.py267 metadata, kw_only): argument
279 self.kw_only = kw_only
347 hash=None, compare=True, metadata=None, kw_only=MISSING): argument
367 metadata, kw_only)
374 return (tuple(f for f in fields if f.init and not f.kw_only),
375 tuple(f for f in fields if f.init and f.kw_only)
802 if f.kw_only is MISSING:
803 f.kw_only = default_kw_only
807 if f.kw_only is not MISSING:
883 match_args, kw_only, slots): argument
[all …]
/third_party/python/Lib/test/
Dtest_dataclasses.py3648 a: ClassVar[int] = field(kw_only=True)
3653 a: ClassVar[int] = field(kw_only=False)
3656 @dataclass(kw_only=True)
3658 a: ClassVar[int] = field(kw_only=False)
3663 @dataclass(kw_only=True)
3666 self.assertTrue(fields(A)[0].kw_only)
3668 @dataclass(kw_only=True)
3670 a: int = field(kw_only=True)
3671 self.assertTrue(fields(A)[0].kw_only)
3673 @dataclass(kw_only=True)
[all …]
/third_party/python/Doc/library/
Ddataclasses.rst49 … eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=Fals…
82 … eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=Fals…
173 - ``kw_only``: If true (the default value is ``False``), then all
208 …ult_factory=MISSING, init=True, repr=True, hash=None, compare=True, metadata=None, kw_only=MISSING)
271 - ``kw_only``: If true, this field will be marked as keyword-only.
309 ``compare``, ``metadata``, and ``kw_only`` have the identical
374 … eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=Fals…
383 ``match_args``, ``kw_only``, and ``slots`` have the same meaning as
639 t: int = field(kw_only=True, default=0)
/third_party/python/Doc/whatsnew/
D3.10.rst1010 @dataclass(kw_only=True)
1027 birthday: datetime.date = field(kw_only=True)
1029 Here only ``birthday`` is keyword-only. If you set ``kw_only`` on
/third_party/python/Misc/NEWS.d/
D3.10.1.rst283 Added missing kw_only parameter to dataclasses.make_dataclass().