[Patches] [ python-Patches-643565 ] Allow keyword args in dict.update()

noreply@sourceforge.net noreply@sourceforge.net
Sat, 28 Dec 2002 21:24:39 -0800


Patches item #643565, was opened at 2002-11-25 09:06
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=643565&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Just van Rossum (jvr)
Assigned to: Nobody/Anonymous (nobody)
Summary: Allow keyword args in dict.update()

Initial Comment:
Now that patch #642500 is in, it only seems logical to
also allow keyword args in dict.update(). This patch
simply reuses dict_init(), so d.update(seq_of_items)
also works. I'm not conviced of the neccessity of this
patch, but the implementation is very simple. Doc and
test will follow (also: gladly accepted ;-) if the idea
is accepted.

Side effect: d.update() (no args!) raises no exception
anymore.

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

>Comment By: Raymond Hettinger (rhettinger)
Date: 2002-12-29 00:24

Message:
Logged In: YES 
user_id=80475

This would be a nice idea for completeness but it is neither 
necessary nor desirable.  d[k]=v is a faster, clearer, one-
way-to-do-it alternative.

The side-effect is also undesirable.  I'm -0 on this one.

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-27 15:58

Message:
Logged In: YES 
user_id=21627

What documentation and test suite changes do you propose?

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

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