1 |
В Пнд, 20/09/2010 в 04:53 +0200, Arfrever Frehtes Taifersar Arahesis |
2 |
пишет: |
3 |
> > while you're in the process of cleaning things up, i know we dont have a rule |
4 |
> > anywhere in terms of line length, but python.eclass has always struck me as a |
5 |
> > file with incredibly excessive line length. comparing to other eclasses, it |
6 |
> > has multiple lines in it longer than any single line in any other eclass. |
7 |
> > |
8 |
> > i normally develop in a terminal with 170 cols (which i think is larger than |
9 |
> > average), so i'm pretty lenient, but even python.eclass exceeds that multiple |
10 |
> > times if not running close to it. |
11 |
> |
12 |
> python.eclass has many nested checks, loops etc. |
13 |
|
14 |
Although we don't write ebuilds in C there are useful bits in |
15 |
/usr/src/linux/Documentation/CodingStyle: |
16 |
|
17 |
1. Coding style is all about readability and maintainability using |
18 |
commonly available tools. |
19 |
|
20 |
2. Now, some people will claim that having 8-character indentations |
21 |
makes the code move too far to the right, and makes it hard to read on a |
22 |
80-character terminal screen. The answer to that is that if you need |
23 |
more than 3 levels of indentation, you're screwed anyway, and should fix |
24 |
your program. |
25 |
|
26 |
|
27 |
In other words having many nested checks means that eclass needs |
28 |
reorganization to avoid them. |
29 |
|
30 |
-- |
31 |
Peter. |