We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ExtendedContext
1 parent 3410cc1 commit c9dd073Copy full SHA for c9dd073
1 file changed
Lib/_pydecimal.py
@@ -1796,10 +1796,10 @@ def __round__(self, n=None):
1796
Decimal('123.46')
1797
>>> round(Decimal('123.456'), -2)
1798
Decimal('1E+2')
1799
- >>> setcontext(ExtendedContext)
1800
- >>> round(Decimal('-Infinity'), 37)
+ >>> with localcontext(ExtendedContext):
+ ... round(Decimal('-Infinity'), 37)
1801
+ ... round(Decimal('sNaN123'), 0)
1802
Decimal('NaN')
- >>> round(Decimal('sNaN123'), 0)
1803
Decimal('NaN123')
1804
1805
"""
0 commit comments