Message219869
Is's like list's operation + and it's method list.extend().
But dict have no operation +...
If I have two lists (A and B), and I want to get third list (not change A and B) i do this:
C = A + B
If I have two dicts, i can do this:
C = dict(A, **B)
But if i have three dictionaries, code becomes this:
C = dict(A, **dict(B, **D))
Don't you think, that "+" is more comfortable?
A = [1, 2, 3]
B = [4, 5]
C = [6, 7]
A + B + C = [1,2,3,4,5,6,7]
I can do this with list, tuples and strings. Why i can't do this with dictionaries? |
|
Date |
User |
Action |
Args |
2014-06-06 10:39:27 | Pix | set | recipients:
+ Pix, vstinner |
2014-06-06 10:39:27 | Pix | set | messageid: <1402051167.46.0.319842293885.issue21678@psf.upfronthosting.co.za> |
2014-06-06 10:39:27 | Pix | link | issue21678 messages |
2014-06-06 10:39:27 | Pix | create | |
|