mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Add nbytes to the memoryview definition (#3167)
`nbytes`, like `contiguous`, was added in Python 3.3.
This commit is contained in:
committed by
Jelle Zijlstra
parent
3c4141982e
commit
1dc24e1c67
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user