29 Mar
2014
29 Mar
'14
8:36 a.m.
Not the first time I found myself recently needing to create "multi-dimensional" dictionaries, so that I could write something like: my_dict = ['a']['b']['b']['a'] = 'fred' and once again I wonder why Python does not support that idiom directly, as it must be a fairly common requirement. I know that there are good solutions like the one at http://ohuiginn.net/mt/2010/07/nested_dictionaries_in_python.html or by using defaultdict but I feel that this really should be part of the language. So, should I propose a PEP? Thanks ... Richard
3652
Age (days ago)
3652
Last active (days ago)
6 comments
7 participants
participants (7)
-
Chris Angelico
-
Greg Ewing
-
Masklinn
-
Philipp A.
-
Richard Prosser
-
Steven D'Aprano
-
Terry Reedy