diff options
author | Stefan Krah <skrah@bytereef.org> | 2015-08-08 11:38:10 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2015-08-08 11:38:10 (GMT) |
commit | 0c51595a784787d8e198af910cb6d79172ee52bb (patch) | |
tree | 56d21e209ab26a91c65cad305097fdf6bd8f1b45 /Doc | |
parent | 917c2c36542131dd81f2b5b4d185c50d3b15546f (diff) | |
download | cpython-0c51595a784787d8e198af910cb6d79172ee52bb.zip cpython-0c51595a784787d8e198af910cb6d79172ee52bb.tar.gz cpython-0c51595a784787d8e198af910cb6d79172ee52bb.tar.bz2 |
Issue #15944: memoryview: Allow arbitrary formats when casting to bytes.
Original patch by Martin Panter.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/stdtypes.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 1ae1693..f0cc56b 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -3564,7 +3564,7 @@ copying. the buffer itself is not copied. Supported casts are 1D -> C-contiguous and C-contiguous -> 1D. - Both formats are restricted to single element native formats in + The destination format is restricted to a single element native format in :mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or 'c'). The byte length of the result must be the same as the original length. @@ -3645,6 +3645,9 @@ copying. .. versionadded:: 3.3 + .. versionchanged:: 3.5 + The source format is no longer restricted when casting to a byte view. + There are also several readonly attributes available: .. attribute:: obj |