[issue10516] Add list.clear() and list.copy()
report at bugs.python.org
Sat Feb 26 11:39:46 CET 2011
Eli Bendersky <eliben at 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 <report at bugs.python.org>
More information about the Python-bugs-list