Add nbytes to the memoryview definition (#3167)

`nbytes`, like `contiguous`, was added in Python 3.3.
This commit is contained in:
Phil Jones
2019-08-03 14:51:55 +00:00
committed by Jelle Zijlstra
parent 3c4141982e
commit 1dc24e1c67
2 changed files with 2 additions and 0 deletions

View File

@@ -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: ...

View File

@@ -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: ...