From db09b441cefa5ac2d2902f27ef1444c6ae78408d Mon Sep 17 00:00:00 2001 From: Alex Frieder Date: Fri, 20 Jan 2017 15:33:59 -0500 Subject: [PATCH] Add __nonzero__ to numeric builtin types --- stdlib/2/__builtin__.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index 9ba1faece..82b8e7890 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -119,6 +119,7 @@ class int(SupportsInt, SupportsFloat, SupportsAbs[int]): def __int__(self) -> int: ... def __abs__(self) -> int: ... def __hash__(self) -> int: ... + def __nonzero__(self) -> bool: ... class float(SupportsFloat, SupportsInt, SupportsAbs[float]): @overload @@ -166,6 +167,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]): def __float__(self) -> float: ... def __abs__(self) -> float: ... def __hash__(self) -> int: ... + def __nonzero__(self) -> bool: ... class complex(SupportsAbs[float]): @overload @@ -201,6 +203,7 @@ class complex(SupportsAbs[float]): def __str__(self) -> str: ... def __abs__(self) -> float: ... def __hash__(self) -> int: ... + def __nonzero__(self) -> bool: ... class basestring(metaclass=ABCMeta): ...