[ python-Bugs-1209671 ] dict.popitem documentation should mention empty dict case

SourceForge.net noreply at sourceforge.net
Fri May 27 09:51:05 CEST 2005


Bugs item #1209671, was opened at 2005-05-27 00:49
Message generated for change (Comment added) made by misterwilliam
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1209671&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: William Chang (misterwilliam)
Assigned to: Nobody/Anonymous (nobody)
Summary: dict.popitem documentation should mention empty dict case

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: William Chang (misterwilliam)
Date: 2005-05-27 00:51

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1209671&group_id=5470


More information about the Python-bugs-list mailing list