Alexandre Vassalotti wrote:
>> Modified: python/branches/py3k-pep3137/Lib/string.py
>> ==============================================================================
>> --- python/branches/py3k-pep3137/Lib/string.py (original)
>> +++ python/branches/py3k-pep3137/Lib/string.py Fri Nov 2 16:59:04 2007
>> @@ -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 = bytes(range(256))
>> + L = buffer(range(256))
>> for i, c in enumerate(frm):
>> L[c] = to[i]
>> return L
>>
>
> Why string.maketrans() was changed to return a buffer object?
The return type was a PyBytes instance before the grant renaming, too. I
guess you are right. It should return a bytes object.
Christian
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins