Rename buffer -> bytearray.

This commit is contained in:
Guido van Rossum 2007-11-21 19:29:53 +00:00
parent 905a904723
commit 254348e201
31 changed files with 290 additions and 290 deletions

View file

@ -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)