Skip to content

Commit a0f5a73

Browse files
ord() only supports bytes and bytearray.
1 parent e82b3e8 commit a0f5a73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,15 +1561,15 @@ are always available. They are listed here in alphabetical order.
15611561

15621562
.. function:: ord(character, /)
15631563

1564-
The argument must be a one-character string or a :term:`bytes-like object`
1565-
of length 1.
1564+
The argument must be a one-character string or a :class:`bytes` or
1565+
:class:`bytearray` object of length 1.
15661566
If it is a one-character string, return an integer
15671567
representing the Unicode code point of that character. For example,
15681568
``ord('a')`` returns the integer ``97`` and ``ord('€')`` (Euro sign)
15691569
returns ``8364``. This is the inverse of :func:`chr`.
15701570

1571-
If the argument is a bytes-like object of length 1, return an integer value
1572-
of its element.
1571+
If the argument is a :class:`!bytes` or :class:`!bytearray` object of
1572+
length 1, return an integer value of its element.
15731573

15741574

15751575
.. function:: pow(base, exp, mod=None)

0 commit comments

Comments
 (0)