@@ -479,7 +479,7 @@ debugging, and in numerical work.
479479 exponent.
480480
481481
482- .. method :: float.fromhex(s)
482+ .. classmethod :: float.fromhex(s)
483483
484484 Class method to return the float represented by a hexadecimal
485485 string *s *. The string *s * may have leading and trailing
@@ -967,7 +967,7 @@ functions based on regular expressions.
967967 'example.com'
968968
969969
970- .. method :: str.maketrans(x[, y[, z]])
970+ .. staticmethod :: str.maketrans(x[, y[, z]])
971971
972972 This static method returns a translation table usable for :meth: `str.translate `.
973973
@@ -1514,8 +1514,8 @@ Wherever one of these methods needs to interpret the bytes as characters
15141514
15151515The bytes and bytearray types have an additional class method:
15161516
1517- .. method :: bytes.fromhex(string)
1518- bytearray.fromhex(string)
1517+ .. classmethod :: bytes.fromhex(string)
1518+ bytearray.fromhex(string)
15191519
15201520 This :class: `bytes ` class method returns a bytes or bytearray object,
15211521 decoding the given string object. The string must contain two hexadecimal
@@ -1524,7 +1524,9 @@ The bytes and bytearray types have an additional class method:
15241524 >>> bytes .fromhex(' f0 f1f2 ' )
15251525 b'\xf0\xf1\xf2'
15261526
1527- The translate method differs in semantics from the version available on strings:
1527+
1528+ The maketrans and translate methods differ in semantics from the versions
1529+ available on strings:
15281530
15291531.. method :: bytes.translate(table[, delete])
15301532
@@ -1533,8 +1535,7 @@ The translate method differs in semantics from the version available on strings:
15331535 mapped through the given translation table, which must be a bytes object of
15341536 length 256.
15351537
1536- You can use the :func: `string.maketrans ` helper function to create a
1537- translation table.
1538+ You can use the :func: `bytes.maketrans ` method to create a translation table.
15381539
15391540 Set the *table * argument to ``None `` for translations that only delete
15401541 characters::
@@ -1543,6 +1544,16 @@ The translate method differs in semantics from the version available on strings:
15431544 b'rd ths shrt txt'
15441545
15451546
1547+ .. staticmethod :: bytes.maketrans(from, to)
1548+
1549+ This static method returns a translation table usable for
1550+ :meth: `bytes.translate ` that will map each character in *from * into the
1551+ character at the same position in *to *; *from * and *to * must be bytes objects
1552+ and have the same length.
1553+
1554+ .. versionadded :: 3.1
1555+
1556+
15461557.. _types-set :
15471558
15481559Set Types --- :class: `set `, :class: `frozenset `
@@ -1847,7 +1858,7 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
18471858
18481859 Return a shallow copy of the dictionary.
18491860
1850- .. method :: fromkeys(seq[, value])
1861+ .. classmethod :: fromkeys(seq[, value])
18511862
18521863 Create a new dictionary with keys from *seq * and values set to *value *.
18531864
0 commit comments