summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-01-24 09:17:24 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-01-24 09:17:24 (GMT)
commite7dfe74ce39cad736da8e3a24fdc4cfb50c7c515 (patch)
tree19bc2a72fefcbcfa49040def36c5d0d9f65d97cc /Doc/whatsnew
parent9a236b02350905ac68680dc738a5d83a7c00f2dd (diff)
downloadcpython-e7dfe74ce39cad736da8e3a24fdc4cfb50c7c515.zip
cpython-e7dfe74ce39cad736da8e3a24fdc4cfb50c7c515.tar.gz
cpython-e7dfe74ce39cad736da8e3a24fdc4cfb50c7c515.tar.bz2
Add entry for hash_info().
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.2.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
index d6872dc..203c18d 100644
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -1106,6 +1106,14 @@ values are equal (:issue:`8188`)::
assert hash(Fraction(3, 2)) == hash(1.5) == \
hash(Decimal("1.5")) == hash(complex(1.5, 0))
+Some of the hashing details are exposed through a new attribute,
+:attr:`sys.hash_info`, which describes the bit width of the hash value, the
+prime modulus, the hash values for *infinity* and *nan*, and the multiplier
+used for the imaginary part of a number:
+
+>>> sys.hash_info
+sys.hash_info(width=64, modulus=2305843009213693951, inf=314159, nan=0, imag=1000003)
+
An early decision to limit the inter-operability of various numeric types has
been relaxed. It is still unsupported (and ill-advised) to have implicit
mixing in arithmetic expressions such as ``Decimal('1.1') + float('1.1')``