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

issubclass(collections.deque, collections.Sequence) == False #56752

Closed
cool-RR mannequin opened this issue Jul 12, 2011 · 6 comments
Closed

issubclass(collections.deque, collections.Sequence) == False #56752

cool-RR mannequin opened this issue Jul 12, 2011 · 6 comments
Assignees

Comments

@cool-RR
Copy link
Mannequin

cool-RR mannequin commented Jul 12, 2011

BPO 12543
Nosy @rhettinger, @merwok, @bitdancer, @cool-RR

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/rhettinger'
closed_at = <Date 2011-07-12.23:08:34.670>
created_at = <Date 2011-07-12.19:16:10.257>
labels = ['invalid']
title = '`issubclass(collections.deque, collections.Sequence) == False`'
updated_at = <Date 2011-07-19.12:17:51.719>
user = 'https://github.com/cool-RR'

bugs.python.org fields:

activity = <Date 2011-07-19.12:17:51.719>
actor = 'eric.araujo'
assignee = 'rhettinger'
closed = True
closed_date = <Date 2011-07-12.23:08:34.670>
closer = 'rhettinger'
components = []
creation = <Date 2011-07-12.19:16:10.257>
creator = 'cool-RR'
dependencies = []
files = []
hgrepos = []
issue_num = 12543
keywords = []
message_count = 6.0
messages = ['140206', '140214', '140216', '140588', '140642', '140656']
nosy_count = 4.0
nosy_names = ['rhettinger', 'eric.araujo', 'r.david.murray', 'cool-RR']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue12543'
versions = []

@cool-RR
Copy link
Mannequin Author

cool-RR mannequin commented Jul 12, 2011

Is there a good reason that issubclass(collections.deque, collections.Sequence) == False? What's not-sequence-y about deque?

@bitdancer
Copy link
Member

Maybe they don't support all Sequence operations? They don't support slicing, certainly, but I can't tell from the collections ABC docs if Sequence is required to support slicing.

@rhettinger
Copy link
Contributor

index() isn't supported.

@rhettinger rhettinger self-assigned this Jul 12, 2011
@merwok
Copy link
Member

merwok commented Jul 18, 2011

They don't support slicing, certainly, but I can't tell from the
collections ABC docs if Sequence is required to support slicing.

This looks like a 2.7 docs bug. The table with ABCs mentions __*item__, but not __*slice__, probably because it was written with 3.x in mind (where slices are a type of __*item__). Do you think we need to improve the documentation for slicing, in general and with regards to collections ABCs?

@rhettinger
Copy link
Contributor

Éric, this is not a doc bug. The sequence ABCs do not require slicing support.

@merwok
Copy link
Member

merwok commented Jul 19, 2011

The sequence ABCs do not require slicing support.
Understood, but is it said in the docs? David said that he couldn’t find that bit of info, which is why I suggested a doc bug.

@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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants