Hmm. What's the point of this rewrite? On Fri, Jan 8, 2010 at 1:35 PM, Catalin Marinas <catalin.marinas@xxxxxxx> wrote: > + try: > + return self.__cache[name][-1] > + except KeyError: > + return None You could write this as return self.__cache.get(name, [None])[-1] -- Karl Wiberg, kha@xxxxxxxxxxx subrabbit.wordpress.com www.treskal.com/kalle -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html