PEP 461: markup tweaks

This commit is contained in:
Nick Coghlan 2014-03-27 21:22:38 +10:00
parent 132b9e6560
commit 2350056bf5
1 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ code `%x`::
b"%x" % val
is equivalent to
is equivalent to::
("%x" % val).encode("ascii")
@ -92,7 +92,7 @@ Examples::
``%s`` is included for two reasons: 1) `b` is already a format code for
``format`` numerics (binary), and 2) it will make 2/3 code easier as Python 2.x
code uses ``%s``; however, it is restricted in what it will accept::
code uses ``%s``; however, it is restricted in what it will accept:
- input type supports ``Py_buffer`` [6]_?
use it to collect the necessary bytes
@ -128,7 +128,7 @@ value. Use cases include developing a new protocol and writing landmarks
into the stream; debugging data going into an existing protocol to see if
the problem is the protocol itself or bad data; a fall-back for a serialization
format; or any situation where defining ``__bytes__`` would not be appropriate
but a readable/informative representation is needed [8].
but a readable/informative representation is needed [8]_.
Examples::
@ -178,8 +178,8 @@ Various new special methods were proposed, such as ``__ascii__``,
``__format_bytes__``, etc.; such methods are not needed at this time, but can
be visited again later if real-world use shows deficiencies with this solution.
A competing PEP, ``PEP 460 Add binary interpolation and formatting`` [9], also
exists.
A competing PEP, ``PEP 460 Add binary interpolation and formatting`` [9]_,
also exists.
Objections