farmdev

2 stupid things I coded this week

#1


try:
    do_stuff()
except:
    etype, val, tb = sys.exc_info()
    raise etype, "%s (%s)" % (val, "happened in the context of X"), tb

#2


class UsedToBeADict(object):
    foobar = make_foobar('with sugar'),
    bazbar = 1
    fezbar = 2

If you don't see the mistakes already, here are some hints...