From 781b079f915d0a71c63384f92ba800601b0eb6cc Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 28 Jul 2016 15:13:27 -0700 Subject: [PATCH] Add Supports{Abs,Float,Int,Round} as base classes for Decimal. (#415) --- stdlib/2.7/decimal.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2.7/decimal.pyi b/stdlib/2.7/decimal.pyi index 673a90477..f4d98d4d4 100644 --- a/stdlib/2.7/decimal.pyi +++ b/stdlib/2.7/decimal.pyi @@ -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): ...