dictionary with tuple keys

2009-12-14 Thread Brandon Devine
Hi all,

I am probably not thinking straight anymore about this problem.  I
have a dictionary with tuple keys in the format (a, b, A, B) and float
values.  I want to collect all the keys with identical (a, b...),
disregarding whatever (... A, B) might be.  Specifically, I want to
sum the float values once I've collected these keys.  I am staring at
my screen, pondering ugly things, and I just know I must be missing a
Pythonic solution.  Any suggestions?

Thanks for any help,

Brandon
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: dictionary with tuple keys

2009-12-15 Thread Brandon Devine
So grateful!  Thanks to all.  The breadth of Python continues to amaze
me, as does your generosity.

("Relative clarity like relative beauty is in the eye of the
beholder,
and few parents have ugly children"... fantastic!)

Brandon

-- 
http://mail.python.org/mailman/listinfo/python-list