37 |
|
|
38 |
- should Tabs be allowed or not? |
- should Tabs be allowed or not? |
39 |
|
|
40 |
Perhaps a conversion tool at "make committable"? |
RESOLVED: a conversion tool at "make committable" will |
41 |
|
convert tabs into 8 spaces |
42 |
|
|
43 |
|
- import grouping is not resolved |
44 |
|
|
45 |
Changes |
Changes |
46 |
======= |
======= |
78 |
- java imports |
- java imports |
79 |
- gzz imports |
- gzz imports |
80 |
|
|
81 |
|
* imports should be in alphabetical order in the groups |
82 |
|
|
83 |
6. Code should be structured so that it can be imported and re-used, for example by |
6. Code should be structured so that it can be imported and re-used, for example by |
84 |
putting state in classes instead of the module namespace. Executable code |
putting state in classes instead of the module namespace. Executable code |
85 |
in module namespace is discouraged -- except for "if __name__=='__main__':" |
in module namespace is discouraged -- except for "if __name__=='__main__':" |
86 |
|
|
87 |
7. Prefer list comprehensions to iterations, especially when dealing with lists. |
7. Class names are CapitalizedWords. |
|
|
|
|
8. Class names are CapitalizedWords. |
|
88 |
|
|
89 |
9. Class methods and attributes are mixedCase. |
8. Class methods and attributes are mixedCase. |
90 |
|
|
91 |
10. Functions are lower_case_with_underscores, variables are lowercase. |
9. Functions and variables are mixedCase. |
92 |
|
|
93 |
11. Tab-size is 8 (will be converted to spaces by make committable), indentation |
9. Tab-size is 8 (will be converted to spaces by make committable), indentation |
94 |
at 4 spaces. |
at 4 spaces. |
95 |
|
|
96 |
12. Never use tabs. |
10. Never use tabs. |
97 |
|
|
98 |
|
|
99 |
Notes |
Notes |
101 |
|
|
102 |
- items 8-12 are arbitrary choices for the sake of consistency |
- items 8-12 are arbitrary choices for the sake of consistency |
103 |
|
|
104 |
- "A Foolish Consistency is the Hobgoblin of Little Minds" - Guido van Rossum |
- "A Foolish Consistency is the Hobgoblin of Little Minds" - Ralph Waldo Emerson |
105 |
|
|
106 |
|
|
107 |
References |
References |