Stavros Korokithakis
Stavros Korokithakis
So far, I'm afraid so. I'm not sure what it would take to change this, as the library is written with fields being independent of each other.
The only problem is that then you won't get the quotes, so it should be `"Wrong keys '%s' in etc"`, i.e. the quotes should be in the string.
Isn't that an even bigger hack?
You do the other way too, and you don't end up replacing strings you shouldn't if the key is `['foo']`.
Say, for example, that the key is `"u'hi'"` (that is, a string that contains `u'hi'`), your solution would turn it into `"'hi'"`, messing with the string itself.
I think that the error string should be strictly aimed towards human consumption. I don't think we should go to great lengths to fix this, my opinion is that we...
The above code seems right to me, it wouldn't exhibit the issue you're describing: ``` >>> 'Wrong keys %s in %r' % (u"foo", {u"foo": u"bar"}) u"Wrong keys foo in {u'foo':...
Yes, but the issue above is the string, not the dictionary: > "Wrong keys 'pager'" in "Wrong keys u'pager' in
But the issue is that it's a problem for tests if the first string sometimes shows a `u` and sometimes does not. Have you seen that in your tests? I...
Please do. It would be great if someone can replicate it so we can fix it.