Simon Willison’s Weblog

Monkeypatching idioms - elegant or ugly? Guido offers a decorator and a metaclass as syntactic sugar for monkeypatching existing Python classes.