From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OxaUq-0007vS-Qx for garchives@archives.gentoo.org; Mon, 20 Sep 2010 07:09:05 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6AD10E0B90 for ; Mon, 20 Sep 2010 07:09:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 30D6C1C020 for ; Mon, 20 Sep 2010 06:12:20 +0000 (UTC) Received: from [192.168.1.3] (ppp85-141-228-114.pppoe.mtu-net.ru [85.141.228.114]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPSA id C4A551B41AC for ; Mon, 20 Sep 2010 06:12:18 +0000 (UTC) Subject: Re: [gentoo-dev] Re: Patch for python.eclass From: Peter Volkov To: gentoo-dev@lists.gentoo.org In-Reply-To: <201009200453.32815.Arfrever@gentoo.org> References: <201009200320.07877.Arfrever@gentoo.org> <201009192145.14827.vapier@gentoo.org> <201009200453.32815.Arfrever@gentoo.org> Content-Type: text/plain; charset="UTF-8" Date: Mon, 20 Sep 2010 10:10:27 +0400 Message-ID: <1284963027.24593.1324.camel@tablet> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 738afdef-2415-41b8-bd20-ca16f69932a3 X-Archives-Hash: 0dba6bf949e19d4bf5151daadc3bc127 =D0=92 =D0=9F=D0=BD=D0=B4, 20/09/2010 =D0=B2 04:53 +0200, Arfrever Frehte= s Taifersar Arahesis =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > while you're in the process of cleaning things up, i know we dont hav= e a rule=20 > > anywhere in terms of line length, but python.eclass has always struck= me as a=20 > > file with incredibly excessive line length. comparing to other eclas= ses, it=20 > > has multiple lines in it longer than any single line in any other ecl= ass. > >=20 > > i normally develop in a terminal with 170 cols (which i think is larg= er than=20 > > average), so i'm pretty lenient, but even python.eclass exceeds that = multiple=20 > > times if not running close to it. >=20 > python.eclass has many nested checks, loops etc. Although we don't write ebuilds in C there are useful bits in /usr/src/linux/Documentation/CodingStyle: 1. Coding style is all about readability and maintainability using commonly available tools. 2. Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. In other words having many nested checks means that eclass needs reorganization to avoid them. --=20 Peter.