I chose this idiom as it simpler + more universal then the other alternative I was seeing, the OrderedDict.
Also the ensuing expression quite uncluttered, I would propose, and does not hurt when added in a function.