diff options
author | Guido van Rossum <guido@python.org> | 2007-11-21 19:29:53 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-11-21 19:29:53 (GMT) |
commit | 254348e201647ad9d264de2cc0fde031e8214719 (patch) | |
tree | f5e6c42989ce114d4a9385404a6b23b2b1ff12af /Lib/encodings | |
parent | 905a904723abadc627be60bf944e2ca76329b06e (diff) | |
download | cpython-254348e201647ad9d264de2cc0fde031e8214719.zip cpython-254348e201647ad9d264de2cc0fde031e8214719.tar.gz cpython-254348e201647ad9d264de2cc0fde031e8214719.tar.bz2 |
Rename buffer -> bytearray.
Diffstat (limited to 'Lib/encodings')
-rw-r--r-- | Lib/encodings/idna.py | 4 | ||||
-rw-r--r-- | Lib/encodings/punycode.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Lib/encodings/idna.py b/Lib/encodings/idna.py index 30f507a..c2ba1da 100644 --- a/Lib/encodings/idna.py +++ b/Lib/encodings/idna.py @@ -153,7 +153,7 @@ class Codec(codecs.Codec): if not input: return b'', 0 - result = buffer() + result = bytearray() labels = dots.split(input) if labels and not labels[-1]: trailing_dot = b'.' @@ -216,7 +216,7 @@ class IncrementalEncoder(codecs.BufferedIncrementalEncoder): if labels: trailing_dot = b'.' - result = buffer() + result = bytearray() size = 0 for label in labels: if size: diff --git a/Lib/encodings/punycode.py b/Lib/encodings/punycode.py index 56e6958..b801a46 100644 --- a/Lib/encodings/punycode.py +++ b/Lib/encodings/punycode.py @@ -10,7 +10,7 @@ import codecs def segregate(str): """3.1 Basic code point segregation""" - base = buffer() + base = bytearray() extended = set() for c in str: if ord(c) < 128: @@ -78,7 +78,7 @@ def T(j, bias): digits = b"abcdefghijklmnopqrstuvwxyz0123456789" def generate_generalized_integer(N, bias): """3.3 Generalized variable-length integers""" - result = buffer() + result = bytearray() j = 0 while 1: t = T(j, bias) @@ -107,7 +107,7 @@ def adapt(delta, first, numchars): def generate_integers(baselen, deltas): """3.4 Bias adaptation""" # Punycode parameters: initial bias = 72, damp = 700, skew = 38 - result = buffer() + result = bytearray() bias = 72 for points, delta in enumerate(deltas): s = generate_generalized_integer(delta, bias) |