Fix formatting.
This commit is contained in:
parent
d98a48bde3
commit
aff226c1bd
|
@ -59,7 +59,7 @@ Example:
|
|||
>>> b'%c' % b'a'
|
||||
b'a'
|
||||
|
||||
``%s`` is restricted in what it will accept::
|
||||
``%s`` is restricted in what it will accept:
|
||||
|
||||
- input type supports ``Py_buffer`` [4]_?
|
||||
use it to collect the necessary bytes
|
||||
|
@ -67,7 +67,7 @@ Example:
|
|||
- input type is something else?
|
||||
use its ``__bytes__`` method [5]_ ; if there isn't one, raise a ``TypeError``
|
||||
|
||||
Examples:
|
||||
Examples::
|
||||
|
||||
>>> b'%s' % b'abc'
|
||||
b'abc'
|
||||
|
@ -83,7 +83,6 @@ Examples:
|
|||
TypeError: 'hello world' has no __bytes__ method, perhaps you need to encode it?
|
||||
|
||||
.. note::
|
||||
|
||||
Because the ``str`` type does not have a ``__bytes__`` method, attempts to
|
||||
directly use ``'a string'`` as a bytes interpolation value will raise an
|
||||
exception. To use ``'string'`` values, they must be encoded or otherwise
|
||||
|
|
Loading…
Reference in New Issue