You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bytearray.translate() should support None first argument #49009
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/birkenfeld'closed_at=<Date2008-12-28.11:55:39.811>created_at=<Date2008-12-27.23:28:50.931>labels= ['interpreter-core', 'type-bug']
title='bytearray.translate() should support None first argument'updated_at=<Date2008-12-28.11:55:39.802>user='https://github.com/birkenfeld'
>>> bytearray().translate(None, None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Type NoneType doesn't support the buffer API
>>> bytearray().translate(None, None)
Erreur de segmentation
Also, the patch should probably be backported to trunk.
Activity
birkenfeld commentedon Dec 27, 2008
bytes.translate() does. Patch attached.
benjaminp commentedon Dec 28, 2008
Looks good to me. I don't think it should be applied to 3.0, though.
pitrou commentedon Dec 28, 2008
Looks like there's a problem:
Also, the patch should probably be backported to trunk.
birkenfeld commentedon Dec 28, 2008
You're right (but the segfault isn't introduced by the patch).
Fixed segfault in 3.0 and 2.6 in r67975 and r67977.
Applied path in 3k and trunk in r67974 and r67976.