Home
last modified time | relevance | path

Searched refs:unsafe_hash (Results 1 – 4 of 4) sorted by relevance

/external/python/cpython3/Lib/
Ddataclasses.py287 def __init__(self, init, repr, eq, order, unsafe_hash, frozen): argument
292 self.unsafe_hash = unsafe_hash
789 def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen): argument
797 unsafe_hash, frozen))
948 hash_action = _hash_action[bool(unsafe_hash),
969 unsafe_hash=False, frozen=False): argument
983 return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
1140 repr=True, eq=True, order=False, unsafe_hash=False, argument
1202 unsafe_hash=unsafe_hash, frozen=frozen)
/external/python/cpython3/Lib/test/
Dtest_dataclasses.py122 @dataclass(unsafe_hash=True)
131 @dataclass(unsafe_hash=True)
144 @dataclass(unsafe_hash=True)
494 @dataclass(unsafe_hash=True)
791 @dataclass(frozen=True, unsafe_hash=True)
1165 @dataclass(unsafe_hash=True)
2270 @dataclass(unsafe_hash=True)
2285 def test(case, unsafe_hash, eq, frozen, with_hash, result): argument
2286 with self.subTest(case=case, unsafe_hash=unsafe_hash, eq=eq,
2290 @dataclass(unsafe_hash=unsafe_hash, eq=eq, frozen=frozen)
[all …]
/external/python/cpython3/Misc/NEWS.d/
D3.7.0b2.rst107 Remove the tri-state parameter "hash", and add the boolean "unsafe_hash". If
108 unsafe_hash is True, add a __hash__ function, but if a __hash__ exists,
109 raise TypeError. If unsafe_hash is False, add a __hash__ based on the
110 values of eq= and frozen=. The unsafe_hash=False behavior is the same as
111 the old hash=None behavior. unsafe_hash=False is the default, just as
/external/python/cpython3/Doc/library/
Ddataclasses.rst47 .. decorator:: dataclass(*, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=F…
80 @dataclass(init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False)
121 - ``unsafe_hash``: If ``False`` (the default), a :meth:`__hash__` method
140 :meth:`__hash__` method with ``unsafe_hash=True``. This might be the case
146 method in your dataclass and set ``unsafe_hash=True``; this will result
326 … bases=(), namespace=None, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=F…
334 ``repr``, ``eq``, ``order``, ``unsafe_hash``, and ``frozen`` have