-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source commit: python/typeshed@d09689f Co-authored-by: hauntsaninja <>
- Loading branch information
1 parent
d96330b
commit c4a9697
Showing
11 changed files
with
300 additions
and
133 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
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
Oops, something went wrong.