From 1dc24e1c6769fa5ce4c9608e87f4562b5ae153e0 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sat, 3 Aug 2019 14:51:55 +0000 Subject: [PATCH] Add nbytes to the memoryview definition (#3167) `nbytes`, like `contiguous`, was added in Python 3.3. --- stdlib/2/__builtin__.pyi | 1 + stdlib/2and3/builtins.pyi | 1 + 2 files changed, 2 insertions(+) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index 03e77bd33..bf12fc093 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -784,6 +784,7 @@ class memoryview(Sized, Container[_mv_container_type]): c_contiguous: bool f_contiguous: bool contiguous: bool + nbytes: int def __init__(self, obj: Union[bytes, bytearray, memoryview]) -> None: ... def __enter__(self) -> memoryview: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> bool: ... diff --git a/stdlib/2and3/builtins.pyi b/stdlib/2and3/builtins.pyi index 03e77bd33..bf12fc093 100644 --- a/stdlib/2and3/builtins.pyi +++ b/stdlib/2and3/builtins.pyi @@ -784,6 +784,7 @@ class memoryview(Sized, Container[_mv_container_type]): c_contiguous: bool f_contiguous: bool contiguous: bool + nbytes: int def __init__(self, obj: Union[bytes, bytearray, memoryview]) -> None: ... def __enter__(self) -> memoryview: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> bool: ...