[Patches] [ python-Patches-917095 ] dict type concat function

SourceForge.net noreply at sourceforge.net
Tue Mar 16 00:33:24 EST 2004


Patches item #917095, was opened at 2004-03-16 05:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=917095&group_id=5470

Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: troy melhase (troy_melhase)
Assigned to: Nobody/Anonymous (nobody)
Summary: dict type concat function

Initial Comment:
Adds a function to dictobject.c that allows python 
expressions like: 
 
>>> d = {2:3} 
>>> d += {4:5} 
>>> d 
{2: 3, 4: 5} 
 
and like: 
 
>>> d = {2:3} 
>>> e = d + {6:7} 
>>> e 
{2: 3, 6: 7} 
 
A few points: 
 
* I don't know much C, and this patch is probably 
implemented much more appropriately by someone who 
does 
 
* I don't know if there's a good reason that the dict 
type doesn't already supply this; if that's the case, 
I'd be interested to know why not 
 
* Lib/test/test_builtin.py fails (as it should) after 
applying this patch 
 
Please advise, and thanks! 

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

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



More information about the Patches mailing list