News for hackers. Stuff that matters.
Re:Python Best Practice Patterns by philangist on Friday February 28, 2014 @01:56PM (#7320708)
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.
Re:Python Best Practice Patterns by Noelkd on Saturday March 01, 2014 @04:31AM (#7323758)
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
Re:Python Best Practice Patterns by DrJ on Saturday March 01, 2014 @02:35AM (#7323528)
a pretty basic error :(