Home
last modified time | relevance | path

Searched refs:hash_info (Results 1 – 14 of 14) sorted by relevance

/external/python/cpython3/Modules/_decimal/tests/
Dbignum.py12 _PyHASH_MODULUS = sys.hash_info.modulus
14 _PyHASH_INF = sys.hash_info.inf
15 _PyHASH_NAN = sys.hash_info.nan
/external/python/cpython3/Lib/test/
Dtest_sys.py430 self.assertEqual(len(sys.hash_info), 9)
431 self.assertLess(sys.hash_info.modulus, 2**sys.hash_info.width)
437 pow(x, sys.hash_info.modulus-1, sys.hash_info.modulus),
440 sys.hash_info.modulus)
442 self.assertIsInstance(sys.hash_info.inf, int)
443 self.assertIsInstance(sys.hash_info.nan, int)
444 self.assertIsInstance(sys.hash_info.imag, int)
446 if sys.hash_info.algorithm in {"fnv", "siphash24"}:
447 self.assertIn(sys.hash_info.hash_bits, {32, 64})
448 self.assertIn(sys.hash_info.seed_bits, {32, 64, 128})
[all …]
Dtest_hash.py45 ok = sys.hash_info.algorithm in {"fnv", "siphash24"}
242 if length < sys.hash_info.cutoff:
245 algorithm = sys.hash_info.algorithm
Dtest_numeric_tower.py14 _PyHASH_MODULUS = sys.hash_info.modulus
15 _PyHASH_INF = sys.hash_info.inf
Dtest_fractions.py581 hmod = sys.hash_info.modulus
582 hinf = sys.hash_info.inf
/external/python/cpython3/Python/
Dsysmodule.c972 PyObject *hash_info; in get_hash_info() local
975 hash_info = PyStructSequence_New(&Hash_InfoType); in get_hash_info()
976 if (hash_info == NULL) in get_hash_info()
979 PyStructSequence_SET_ITEM(hash_info, field++, in get_hash_info()
981 PyStructSequence_SET_ITEM(hash_info, field++, in get_hash_info()
983 PyStructSequence_SET_ITEM(hash_info, field++, in get_hash_info()
985 PyStructSequence_SET_ITEM(hash_info, field++, in get_hash_info()
987 PyStructSequence_SET_ITEM(hash_info, field++, in get_hash_info()
989 PyStructSequence_SET_ITEM(hash_info, field++, in get_hash_info()
991 PyStructSequence_SET_ITEM(hash_info, field++, in get_hash_info()
[all …]
/external/python/cpython3/Lib/
Dfractions.py40 _PyHASH_MODULUS = sys.hash_info.modulus
43 _PyHASH_INF = sys.hash_info.inf
D_pydecimal.py6401 _PyHASH_MODULUS = sys.hash_info.modulus
6403 _PyHASH_INF = sys.hash_info.inf
6404 _PyHASH_NAN = sys.hash_info.nan
/external/python/cpython3/Doc/library/
Dstdtypes.rst647 :data:`sys.hash_info`.
663 ``hash(x)`` to be the constant value ``sys.hash_info.inf``.
669 - The particular values ``sys.hash_info.inf``, ``-sys.hash_info.inf``
670 and ``sys.hash_info.nan`` are used as hash values for positive
676 sys.hash_info.imag * hash(z.imag)``, reduced modulo
677 ``2**sys.hash_info.width`` so that it lies in
678 ``range(-2**(sys.hash_info.width - 1), 2**(sys.hash_info.width -
696 P = sys.hash_info.modulus
702 hash_value = sys.hash_info.inf
717 return sys.hash_info.nan
[all …]
Dsys.rst711 .. data:: hash_info
/external/python/cpython3/Doc/tutorial/
Dmodules.rst320 'gettrace', 'hash_info', 'hexversion', 'implementation', 'int_info',
/external/python/cpython3/Doc/whatsnew/
D3.2.rst1297 :attr:`sys.hash_info`, which describes the bit width of the hash value, the
1301 >>> sys.hash_info # doctest: +SKIP
1302 sys.hash_info(width=64, modulus=2305843009213693951, inf=314159, nan=0, imag=1000003)
D3.4.rst1852 The PEP adds additional fields to the :attr:`sys.hash_info` struct sequence to
/external/python/cpython3/Doc/reference/
Ddatamodel.rst1409 ``python -c "import sys; print(sys.hash_info.width)"``.