Mercurial > cpython-lru_cache-weakref
diff Lib/string.py @ 43947:cbc8b3bd3157
Rename buffer -> bytearray.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 21 Nov 2007 19:29:53 +0000 |
| parents | 0d462d789b18 |
| children | b0fcb17f7efa |
line wrap: on
line diff
--- a/Lib/string.py Wed Nov 21 02:51:50 2007 +0000 +++ b/Lib/string.py Wed Nov 21 19:29:53 2007 +0000 @@ -53,7 +53,7 @@ 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)
