From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 92530138247 for ; Sun, 15 Dec 2013 00:05:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8127DE0980; Sun, 15 Dec 2013 00:05:09 +0000 (UTC) Received: from qmta08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by pigeon.gentoo.org (Postfix) with ESMTP id C2F92E0980 for ; Sun, 15 Dec 2013 00:05:08 +0000 (UTC) Received: from omta15.westchester.pa.mail.comcast.net ([76.96.62.87]) by qmta08.westchester.pa.mail.comcast.net with comcast id 1bnj1n0031swQuc58c58QZ; Sun, 15 Dec 2013 00:05:08 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta15.westchester.pa.mail.comcast.net with comcast id 1c571n00A152l3L3bc5738; Sun, 15 Dec 2013 00:05:08 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id C1A7CD69118; Sat, 14 Dec 2013 16:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1387065906; bh=fmUtpvg0mvii9nxpb+fT9aVRdLLqiLsqupE26TCH0rg=; h=Date:From:To:Subject:References:In-Reply-To; b=YQGnYJcI6ajK8yLqBTwkuPyoUEX8nQw1DnUQp6VrLuVa4PbSOIffZPrzeT4ccJI28 89v8dUW272MUXyHiKUIBqa3HgrN2DX7uZrUB1iTORwz76qdsHCGoDRSEu3HDwWvx8v zkRrSHuyrHUJWy+Fevbk07XDzr/Q2/aYvNRDZfgM= Date: Sat, 14 Dec 2013 16:05:06 -0800 From: "W. Trevor King" To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH 1/4] Add more configured defaults Message-ID: <20131215000506.GF25409@odin.tremily.us> References: <1386990436-9198-1-git-send-email-dolsen@gentoo.org> <1386990436-9198-2-git-send-email-dolsen@gentoo.org> <1535770.iBKyIEEe9T@moiraine> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8JAmzYDSl0Sjbh5d" Content-Disposition: inline In-Reply-To: <1535770.iBKyIEEe9T@moiraine> OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; url=http://tremily.us/pubkey.txt User-Agent: Mutt/1.5.22 (2013-10-16) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1387065908; bh=xNt+/E0HFMB+l1/zvKj0MfsW64yxPUSsyBXUuLXixBU=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=VD1siF4wIRpttUmeI14dMqSLTvsYbqGQ97j++CYpOCLBsB8TgSYlCTzDdRsBA8Fs7 Vp+oVLzrEUVrlI91RsO2m3jt+j7cSxbsu37ZrQUM+CrDw0/1tdzLOP6R7cnOjZtjni ViNxZHKcuJQRN3hBD9YJxAipVt8JDihbo9HXDwXBCGk8gHYMi5bVbXGn8o9Pt2NWoC FDMO2YAbDas7xxp6lUs4/GXTwBe7x90FtOAmiYHm+4SqzOLac7E7NG+YgmJ9zPEskJ w6RVDcZq6a+g7E5OoQsK1BBrA38eVOUTK+B/wk7g7+s15MXdtbBKdYqY+N2u/4WyQF GKXfViFrdyIHQ== X-Archives-Salt: 70f3b14b-40ae-4e31-a453-89ad1bfb9049 X-Archives-Hash: b076bc4b96af38a0b6b17d83b3c0d487 --8JAmzYDSl0Sjbh5d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 14, 2013 at 06:33:43AM -0800, Dylan Baker wrote: > I'd also suggest using the str.format() method instead of > concatenating a large number of strings and variables, it's much > more readable IMHO: > > self.settings["snapshot_path"] =3D os.path.normpath( > "{0}/snapshots/{1}{2}.tar.xz".format( > self.settings["storedir"], self.settings["snapshot_name"], > self.settings["snapshot"])) I love format(). In fact, I'd suggest: normpath('{storedir}/snapshots/{snapshot_name}{snapshot}.tar.xz'.format( **self.settings)) However, the string formatting syntax is orthogonal to the snapshot_name setting, which is what Brian's adding in this patch. I think a refactor that converts Catalyst to format() would be great, but it should probably wait until after Brian's rewrite lands. Cheers, Trevor --=20 This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy --8JAmzYDSl0Sjbh5d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSrPIwAAoJEKKfehoaNkbtlF4QAIOIBKawn3kwwpQVrsoBKHrD ktxMc+UrANLIouHEeEXYdfaU7fJ9LZAUx5BANwJyDeicwLOMMofq7mtjWFlsb8NQ ioz1ZIRpjZXTY4cQIxti1O+h9cT1EOkilHP0nDNlPTBQadteK8SVVHeHQYpliZYe GCrgrcBkd8ofloC6GPbnOG7YvYeOwjO5+Xh1rY6fQgN+IV9vDTiIerTuvrK49Jkn I/nA7JKypaDCOALoZORt9VIg114NFOxf2c1OYq6dXihyIq2I9TjOkR9nErv8IQKn RArfeLQa+2KzNlW7G0ICz+Ujy8F+DYOYi8bV9F8/RrMTRjH4N+64pYKKXNhWsfA0 ftl9BdxF3ch8o42JOEliZskN4nGO0rGFCZPT/WgMQQKbSPX/L5fY+nwUMft7ZENh 0di3KCFZEY2IYOoU1qlwLEtGQmvGOIrqIPPLTrjUT5ITOfBwkRCU8wjgX/YM4mJB 3uJg52ODb8obtbYJDV6O1ty2JDgxGGCn7Gb4WAyDXJv2DbSMbpZxIkJKBtIgQfhL KB5a3QX3LH2IbQWQFHAIIwd8QfkhrEqn7uDXRAsbJtvrMrVHWKHkBb3DESIqV7S/ dVV+ZtieCz2klo1hj2UAbmEr/3LV35Xnf/YY3Jh+o/7tK2jgr6H0W0dKc0UayMsX slf1yDBM8OpIj0wZ5QQA =Lb9C -----END PGP SIGNATURE----- --8JAmzYDSl0Sjbh5d--