diff --git a/pysnooper/variables.py b/pysnooper/variables.py index 00f67f4..b0486bb 100644 --- a/pysnooper/variables.py +++ b/pysnooper/variables.py @@ -74,7 +74,7 @@ class Keys(CommonVariable): return main_value.keys() def _format_key(self, key): - return '[{!r}]'.format(key) + return '[{}]'.format(get_shortish_repr(key)) def _get_value(self, main_value, key): return main_value[key]