In Python, this is the best code I could come up with for adding a new key, value to a dict
mytable.setdefault( k, [] ).append( v ) In Perl, the code looks like this: $h{ $key } = $value ;Is there a better/easier way to code this in Python than the obtuse/arcane setdefault code?
-- http://mail.python.org/mailman/listinfo/python-list