diff --git a/Lib/_pydecimal.py b/Lib/_pydecimal.py index d6846cc2845e83..ed9d565a3b5b82 100644 --- a/Lib/_pydecimal.py +++ b/Lib/_pydecimal.py @@ -439,7 +439,7 @@ def IEEEContext(bits, /): ctx.Emin = 1 - ctx.Emax ctx.rounding = ROUND_HALF_EVEN ctx.clamp = 1 - ctx.traps = {s: False for s in _signals} + ctx.traps = dict.fromkeys(_signals, False) return ctx diff --git a/Misc/NEWS.d/next/Library/2024-07-19-07-16-50.gh-issue-53032.paXN3p.rst b/Misc/NEWS.d/next/Library/2024-07-19-07-16-50.gh-issue-53032.paXN3p.rst index 90ca2a3b9ff13f..86c19bf660d756 100644 --- a/Misc/NEWS.d/next/Library/2024-07-19-07-16-50.gh-issue-53032.paXN3p.rst +++ b/Misc/NEWS.d/next/Library/2024-07-19-07-16-50.gh-issue-53032.paXN3p.rst @@ -1,3 +1,3 @@ -Expose function :func:`decimal.IEEEContext` to support creation of -contexts, corresponding to the IEEE 754 (2008) decimal interchange formats. +Expose :func:`decimal.IEEEContext` to support creation of contexts +corresponding to the IEEE 754 (2008) decimal interchange formats. Patch by Sergey B Kirpichev.