Re: [StGit PATCH 1/3] Populate the cached config options with the defaults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]