Hacker News new | ask | show | jobs
by philangist 4488 days 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.
2 comments

Do you have to show the code to someone before your allowed to run it? Can't see how you wouldn't have spotted this yourself
a pretty basic error :(