3 ms·
Showed this to a senior dev at work and he pointed out another (subtle) error for each in enumerate(items): if each.match(self): # This
by philangist 13y ago
Showed this to a senior dev at work and he pointed out another (subtle) error
for each in enumerate(items):
if each.match(self):
# This fails because enumerate yields an (index, value) tuple.
# Match isn't a function defined on tuples.