mirror of https://github.com/python/cpython
Merge: #25916: fix a few 'string of bytes' references.
This commit is contained in:
commit
d44500cc29
|
@ -192,7 +192,7 @@ frequently used than UTF-8.) UTF-8 uses the following rules:
|
||||||
UTF-8 has several convenient properties:
|
UTF-8 has several convenient properties:
|
||||||
|
|
||||||
1. It can handle any Unicode code point.
|
1. It can handle any Unicode code point.
|
||||||
2. A Unicode string is turned into a string of bytes containing no embedded zero
|
2. A Unicode string is turned into a sequence of bytes containing no embedded zero
|
||||||
bytes. This avoids byte-ordering issues, and means UTF-8 strings can be
|
bytes. This avoids byte-ordering issues, and means UTF-8 strings can be
|
||||||
processed by C functions such as ``strcpy()`` and sent through protocols that
|
processed by C functions such as ``strcpy()`` and sent through protocols that
|
||||||
can't handle zero bytes.
|
can't handle zero bytes.
|
||||||
|
|
|
@ -144,7 +144,7 @@ in :mod:`logging` itself) and defining handlers which are declared either in
|
||||||
(perhaps if decryption were performed).
|
(perhaps if decryption were performed).
|
||||||
|
|
||||||
To send a configuration to the socket, read in the configuration file and
|
To send a configuration to the socket, read in the configuration file and
|
||||||
send it to the socket as a string of bytes preceded by a four-byte length
|
send it to the socket as a sequence of bytes preceded by a four-byte length
|
||||||
string packed in binary using ``struct.pack('>L', n)``.
|
string packed in binary using ``struct.pack('>L', n)``.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
|
@ -158,7 +158,7 @@ AU_read objects, as returned by :func:`.open` above, have the following methods:
|
||||||
|
|
||||||
.. method:: AU_read.readframes(n)
|
.. method:: AU_read.readframes(n)
|
||||||
|
|
||||||
Reads and returns at most *n* frames of audio, as a string of bytes. The data
|
Reads and returns at most *n* frames of audio, as a :class:`bytes` object. The data
|
||||||
will be returned in linear format. If the original data is in u-LAW format, it
|
will be returned in linear format. If the original data is in u-LAW format, it
|
||||||
will be converted.
|
will be converted.
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ Wave_read objects, as returned by :func:`.open`, have the following methods:
|
||||||
|
|
||||||
.. method:: Wave_read.readframes(n)
|
.. method:: Wave_read.readframes(n)
|
||||||
|
|
||||||
Reads and returns at most *n* frames of audio, as a string of bytes.
|
Reads and returns at most *n* frames of audio, as a :class:`bytes` object.
|
||||||
|
|
||||||
|
|
||||||
.. method:: Wave_read.rewind()
|
.. method:: Wave_read.rewind()
|
||||||
|
|
Loading…
Reference in New Issue