Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement MutableSequence.clear() #55597

Closed
elibendersky mannequin opened this issue Mar 3, 2011 · 8 comments
Closed

Implement MutableSequence.clear() #55597

elibendersky mannequin opened this issue Mar 3, 2011 · 8 comments
Labels
easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@elibendersky
Copy link
Mannequin

elibendersky mannequin commented Mar 3, 2011

BPO 11388
Nosy @birkenfeld, @rhettinger, @terryjreedy, @ncoghlan, @bitdancer, @durban

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 = None
closed_at = <Date 2011-04-08.18:40:36.658>
created_at = <Date 2011-03-03.18:36:45.687>
labels = ['easy', 'type-bug', 'library']
title = 'Implement MutableSequence.clear()'
updated_at = <Date 2011-04-08.18:40:36.657>
user = 'https://bugs.python.org/elibendersky'

bugs.python.org fields:

activity = <Date 2011-04-08.18:40:36.657>
actor = 'eli.bendersky'
assignee = 'eli.bendersky'
closed = True
closed_date = <Date 2011-04-08.18:40:36.658>
closer = 'eli.bendersky'
components = ['Library (Lib)']
creation = <Date 2011-03-03.18:36:45.687>
creator = 'eli.bendersky'
dependencies = []
files = []
hgrepos = []
issue_num = 11388
keywords = ['easy']
message_count = 8.0
messages = ['129994', '129997', '129998', '130024', '130031', '130040', '130046', '130468']
nosy_count = 8.0
nosy_names = ['georg.brandl', 'rhettinger', 'terry.reedy', 'ncoghlan', 'stutzbach', 'r.david.murray', 'eli.bendersky', 'daniel.urban']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'needs patch'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue11388'
versions = ['Python 3.3']

@elibendersky
Copy link
Mannequin Author

elibendersky mannequin commented Mar 3, 2011

Now that both list and bytearray support the clear() method (see issue bpo-10516), MutableSequence.clear() has to be implemented.

This is pending on commit for issue bpo-11386, which fixes the exception thrown by bytearray.pop() when the bytearray is empty.

@elibendersky elibendersky mannequin self-assigned this Mar 3, 2011
@elibendersky elibendersky mannequin added stdlib Python modules in the Lib dir easy type-bug An unexpected behavior, bug, or error labels Mar 3, 2011
@rhettinger
Copy link
Contributor

s/has to be/could be/

But yes, this would be a worthwhile addition to MutableSequence :-)

@birkenfeld
Copy link
Member

+1.

@elibendersky
Copy link
Mannequin Author

elibendersky mannequin commented Mar 4, 2011

Committed in revision 88740

The non-abstract methods of MutableSequence and other classes currently seem to have no unit-tests. Any ideas about the best testing strategy for them?

@birkenfeld
Copy link
Member

Creating a minimal concrete subclass and testing with that would be the obvious thing.

@rhettinger
Copy link
Contributor

Please also update the table entry for MutableSequence in Doc/library/collections.abc.rst

@elibendersky
Copy link
Mannequin Author

elibendersky mannequin commented Mar 4, 2011

Documentation fix and some unit tests committed in revision 88742

@bitdancer
Copy link
Member

Eli, did you leave this open on purpose or can it be closed?

@elibendersky elibendersky mannequin closed this as completed Apr 8, 2011
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants