[Patches] [ python-Patches-1438113 ] dict.getdefault() implementation

SourceForge.net noreply at sourceforge.net
Fri Feb 24 22:01:26 CET 2006


Patches item #1438113, was opened at 2006-02-24 14:20
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1438113&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: Core (C code)
Group: Python 2.5
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: dict.getdefault() implementation

Initial Comment:
This article:

http://mail.python.org/pipermail/python-dev/2006-February/061748.html

describes dict.getdefault() as a replacement for
dict.setdefault().  Here is a candidate implementation.


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

>Comment By: Georg Brandl (gbrandl)
Date: 2006-02-24 21:01

Message:
Logged In: YES 
user_id=849994

I'm not entirely sure how to explain to newcomers what the
hell the difference between getdefault and setdefault is,
and what their names have to do with it.

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

Comment By: Thomas Wouters (twouters)
Date: 2006-02-24 16:52

Message:
Logged In: YES 
user_id=34209

Super, looks great, excellent cut-and-paste work there, Barry. Let's check this in 
while Guido is too busy talking to people at Pycon to notice. ;-)


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

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


More information about the Patches mailing list