Add Supports{Abs,Float,Int,Round} as base classes for Decimal. (#415)

This commit is contained in:
Guido van Rossum
2016-07-28 15:13:27 -07:00
committed by Matthias Kramm
parent 6701a10e93
commit 781b079f91

View File

@@ -2,7 +2,7 @@
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from typing import Any, SupportsAbs, SupportsFloat, SupportsInt, SupportsRound
ROUND_DOWN = ... # type: Any
ROUND_HALF_UP = ... # type: Any
@@ -44,7 +44,7 @@ def setcontext(context): ...
def getcontext(): ...
def localcontext(ctx=None): ...
class Decimal:
class Decimal(SupportsAbs, SupportsFloat, SupportsInt, SupportsRound):
def __new__(cls, value=..., context=None): ...
@classmethod
def from_float(cls, f): ...