Georg Brandl wrote:
The call syntax part is a mixed bag: on the one hand it is nice to be
consistent with the extended possibilities in literals (flattening),
but on the other hand there would be small but annoying inconsistencies
anyways (e.g. the duplicate kwarg case above).
That inconsistenc
John Wong wrote:
I am actually
amazed to remember dict + dict is not possible... there must be a reason
(performance??) for this...
I think it's mainly because there is no obviously
correct answer to the question of what to do about
duplicate keys.
--
Greg
__
On 02/10/2015 10:33 AM, Paul Moore wrote:
> On 10 February 2015 at 00:29, Neil Girdhar wrote:
>>> > function(**kw_arguments, **more_arguments)
>>> If the key "key1" is in both dictionaries, more_arguments wins, right?
>>
>>
>> There was some debate and it was decided that duplicate keyword argumen
I split off a separate thread on python-ideas [1] specific to the idea of
introducing "+" and "+=" operators on a dict.
[1] https://mail.python.org/pipermail/python-ideas/2015-February/031748.html
~ Ian Lee
On Tue, Feb 10, 2015 at 10:35 PM, John Wong wrote:
>
>
> On Wed, Feb 11, 2015 at 12:35
On Wed, Feb 11, 2015 at 12:35 AM, Ian Lee wrote:
> +1 for adding "+" or "|" operator for merging dicts. To me this operation:
>
> >>> {'x': 1, 'y': 2} + {'z': 3}
> {'x': 1, 'y': 2, 'z': 3}
>
> Is very clear. The only potentially non obvious case I can see then is
> when there are duplicate keys,
You might want to try asking on python-l...@python.org to get a wider
audience as you might find a fellow AIX user there who can help you out.
On Wed Feb 11 2015 at 12:29:56 AM Dwight wrote:
> Hi,
> I am primarily a user; but since I can not get a newer version
> of firefox for my system I
On Wed, 11 Feb 2015 18:45:40 +1300
Greg Ewing wrote:
> Antoine Pitrou wrote:
> bytearray(b"a") + b"bc"
> >
> > bytearray(b'abc')
> >
> b"a" + bytearray(b"bc")
> >
> > b'abc'
> >
> > It's quite convenient.
>
> It's a bit disconcerting that the left operand wins,
> rather than one of th