Tweak container contents viewing (Bug #55)

This commit is contained in:
Andreas Kloeckner 2015-08-12 09:52:44 -05:00
parent 824393ca33
commit a123105e65

View File

@ -323,24 +323,29 @@ class ValueWalker:
# containers --------------------------------------------------
key_it = None
try:
l = len(value)
if PY3:
key_it = value.keys()
else:
key_it = value.iterkeys()
except:
pass
else:
if key_it is None:
try:
value[0]
except IndexError:
key_it = []
l = len(value)
except:
pass
else:
key_it = xrange(l)
try:
key_it = value.iterkeys()
except:
pass
try:
value[0]
except IndexError:
key_it = []
except:
pass
else:
key_it = xrange(l)
if key_it is not None:
cnt = 0