> I'm curious why you are using repr() here. Is it to spot unicode strings or something else?

As things stand, there's nothing to stop someone using non-text keys in an attributes dictionary. For example: `cube.attributes[42] = 'answer'`. Using `repr()` lets you see the difference between a key of `42` and a key of `'42'`.