3 ms·
In my teaching of python to newcomers (mostly coming from matlab/R or no programming background) they often try to do dict_a + dict_b, and are confused as to wh
by hjk05 8y ago
In my teaching of python to newcomers (mostly coming from matlab/R or no programming background) they often try to do dict_a + dict_b, and are confused as to why that doesn’t work when list_a + list_b works fine.
It think it’s an extreme stretch to claim it’s non-intuitive.
- speedplane 8y agoIf dict addition was purely insertion, I would agree with you, but there is no way the following is intuitive: {1 : 1} + {1 : 2} ==> {1 : 2}