Eli Bendersky <eli...@gmail.com> added the comment: Attaching a patch adding copy() and clear() to bytearrays, with tests and doc.
I didn't add the methods to MutableSequence because I have a doubt about it - in particular which exception get raised by .pop if it's empty. Curiously, lists and bytearrays raise different exceptions in this case - IndexError and OverflowError, respectively. ---------- assignee: eli.bendersky -> rhettinger stage: commit review -> patch review status: closed -> open Added file: http://bugs.python.org/file20905/issue10516.bytearray.1.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10516> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com