mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
Rename buffer -> bytearray.
This commit is contained in:
parent
905a904723
commit
254348e201
31 changed files with 290 additions and 290 deletions
|
|
@ -53,7 +53,7 @@ def maketrans(frm: bytes, to: bytes) -> bytes:
|
|||
raise ValueError("maketrans arguments must have same length")
|
||||
if not (isinstance(frm, bytes) and isinstance(to, bytes)):
|
||||
raise TypeError("maketrans arguments must be bytes objects")
|
||||
L = buffer(range(256))
|
||||
L = bytearray(range(256))
|
||||
for i, c in enumerate(frm):
|
||||
L[c] = to[i]
|
||||
return bytes(L)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue