From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1L9AvA-0002Kn-4y for garchives@archives.gentoo.org; Sun, 07 Dec 2008 04:07:04 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C954DE036A; Sun, 7 Dec 2008 04:07:01 +0000 (UTC) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.185]) by pigeon.gentoo.org (Postfix) with ESMTP id 87A2FE036A for ; Sun, 7 Dec 2008 04:07:01 +0000 (UTC) Received: by fk-out-0910.google.com with SMTP id 18so651346fks.2 for ; Sat, 06 Dec 2008 20:07:00 -0800 (PST) Received: by 10.223.116.79 with SMTP id l15mr870535faq.107.1228622820620; Sat, 06 Dec 2008 20:07:00 -0800 (PST) Received: by 10.223.112.17 with HTTP; Sat, 6 Dec 2008 20:07:00 -0800 (PST) Message-ID: Date: Sun, 7 Dec 2008 13:07:00 +0900 From: "Douglas Anderson" To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] Python style (Was: equery refactorization) In-Reply-To: <493B1DB9.6060008@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <33EF1957-2481-4AF1-A112-D12D7C1119A7@smith-li.com> <493B08E6.4010405@smith-li.com> <493B1DB9.6060008@gentoo.org> X-Archives-Salt: 77cf5c47-df2a-4416-b75e-ef1b94cc3338 X-Archives-Hash: ee6b494154ddd7c6992b84fa5d6bbeba On Sun, Dec 7, 2008 at 9:50 AM, Zac Medico wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Michael A. Smith wrote: >> Actually I don't like spaces for indentation at all. A tab character and a >> space character take the same number of bytes, so it takes two-to-eight >> times >> as much space per indentation to store the same indentation as a single tab >> character. On the average project that can add up to several kilobytes of >> difference. Furthermore, it completely _prevents_ collaborators from >> enjoying a >> bit of customization as to the amount of indentation. If I like my >> indentation >> to be two spaces, and you like yours to be four, then we can each set >> our text >> editors that way and continue to happily share code that uses tabs for >> indentation. >> >> I disagree with both PEP8 and Gentoo SOC styles on the matter. I would >> love it >> if someone could explain to me the actual benefit of using spaces over >> tabs. > > FWIW, I feel the same way. > > - -- > Thanks, > Zac > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (GNU/Linux) > > iEYEARECAAYFAkk7HbgACgkQ/ejvha5XGaPBmwCfdGEMZR7iegoVmfzCicNP/omE > WV8AoORjzg8IHtbAzVvEs1QJydiPXBKF > =VoL/ > -----END PGP SIGNATURE----- > > Again, not starting a holy war here, I'm happy using tabs as that's what people want, but you asked why most Python people prefer spaces, and one of the reasons is that it's considered Pythonic to match the indentation level of an opening parenthesis, for example: http://rafb.net/p/SHb5sC97.html With tabs you can't do that faithfully. And yes tabs do use less space, but at the expense of readability. Stripping doc string out would also use less space. As PEP 20 says, readability counts. As Python is largely reliant on indentation for meaning in code, spaces work well in python where they're not necessary in, say, bash. That's just MHO. -Doug