-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix various
__all__
bugs and omissions (#7618)
- Loading branch information
1 parent
f87e811
commit 40985b4
Showing
5 changed files
with
204 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,85 @@ | ||
import sys | ||
|
||
# This is a slight lie, the implementations aren't exactly identical | ||
# However, in all likelihood, the differences are inconsequential | ||
from decimal import * | ||
|
||
if sys.version_info >= (3, 7): | ||
__all__ = [ | ||
"Decimal", | ||
"Context", | ||
"DecimalTuple", | ||
"DefaultContext", | ||
"BasicContext", | ||
"ExtendedContext", | ||
"DecimalException", | ||
"Clamped", | ||
"InvalidOperation", | ||
"DivisionByZero", | ||
"Inexact", | ||
"Rounded", | ||
"Subnormal", | ||
"Overflow", | ||
"Underflow", | ||
"FloatOperation", | ||
"DivisionImpossible", | ||
"InvalidContext", | ||
"ConversionSyntax", | ||
"DivisionUndefined", | ||
"ROUND_DOWN", | ||
"ROUND_HALF_UP", | ||
"ROUND_HALF_EVEN", | ||
"ROUND_CEILING", | ||
"ROUND_FLOOR", | ||
"ROUND_UP", | ||
"ROUND_HALF_DOWN", | ||
"ROUND_05UP", | ||
"setcontext", | ||
"getcontext", | ||
"localcontext", | ||
"MAX_PREC", | ||
"MAX_EMAX", | ||
"MIN_EMIN", | ||
"MIN_ETINY", | ||
"HAVE_THREADS", | ||
"HAVE_CONTEXTVAR", | ||
] | ||
else: | ||
__all__ = [ | ||
"Decimal", | ||
"Context", | ||
"DecimalTuple", | ||
"DefaultContext", | ||
"BasicContext", | ||
"ExtendedContext", | ||
"DecimalException", | ||
"Clamped", | ||
"InvalidOperation", | ||
"DivisionByZero", | ||
"Inexact", | ||
"Rounded", | ||
"Subnormal", | ||
"Overflow", | ||
"Underflow", | ||
"FloatOperation", | ||
"DivisionImpossible", | ||
"InvalidContext", | ||
"ConversionSyntax", | ||
"DivisionUndefined", | ||
"ROUND_DOWN", | ||
"ROUND_HALF_UP", | ||
"ROUND_HALF_EVEN", | ||
"ROUND_CEILING", | ||
"ROUND_FLOOR", | ||
"ROUND_UP", | ||
"ROUND_HALF_DOWN", | ||
"ROUND_05UP", | ||
"setcontext", | ||
"getcontext", | ||
"localcontext", | ||
"MAX_PREC", | ||
"MAX_EMAX", | ||
"MIN_EMIN", | ||
"MIN_ETINY", | ||
"HAVE_THREADS", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters