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

dict.popitem documentation should mention empty dict case #42022

Closed
misterwilliam mannequin opened this issue May 27, 2005 · 3 comments
Closed

dict.popitem documentation should mention empty dict case #42022

misterwilliam mannequin opened this issue May 27, 2005 · 3 comments
Labels
docs Documentation in the Doc dir

Comments

@misterwilliam
Copy link
Mannequin

misterwilliam mannequin commented May 27, 2005

BPO 1209671
Nosy @rhettinger

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 2005-05-27.10:46:01.000>
created_at = <Date 2005-05-27.07:49:04.000>
labels = ['docs']
title = 'dict.popitem documentation should mention empty dict case'
updated_at = <Date 2005-05-27.10:46:01.000>
user = 'https://bugs.python.org/misterwilliam'

bugs.python.org fields:

activity = <Date 2005-05-27.10:46:01.000>
actor = 'rhettinger'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2005-05-27.07:49:04.000>
creator = 'misterwilliam'
dependencies = []
files = []
hgrepos = []
issue_num = 1209671
keywords = []
message_count = 3.0
messages = ['25424', '25425', '25426']
nosy_count = 2.0
nosy_names = ['rhettinger', 'misterwilliam']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1209671'
versions = ['Python 2.4']

@misterwilliam
Copy link
Mannequin Author

misterwilliam mannequin commented May 27, 2005

Currently the documentation in the Python Library
Reference entry for Mapping Types does not mention what
happens when dict.popitem() is called on an empty mapping.

I think that the documentation should mention that a
KeyError exception is raised. (At least this is what
happens when I try it in the official Python 2.4
release with a dictionary.)

If this omission was intentional to give room for
future implementors of python/mappings I feel that this
should at least be mentioned in the documentation to
remind programmers this behavior is not specified.

@misterwilliam misterwilliam mannequin closed this as completed May 27, 2005
@misterwilliam misterwilliam mannequin added the docs Documentation in the Doc dir label May 27, 2005
@misterwilliam misterwilliam mannequin closed this as completed May 27, 2005
@misterwilliam misterwilliam mannequin added the docs Documentation in the Doc dir label May 27, 2005
@misterwilliam
Copy link
Mannequin Author

misterwilliam mannequin commented May 27, 2005

Logged In: YES
user_id=1286263

I wasn't being very precise when I substituted dict for
mapping types in the summary. I'm so used to thinking of
them interchangeablely. I suppose it might matter though.

@rhettinger
Copy link
Contributor

Logged In: YES
user_id=80475

Okay, fixed.
Thanks for the report.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

1 participant