summaryrefslogtreecommitdiff
path: root/DEVELOPING
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2010-01-06 15:54:37 +0000
committerfuzzyray <fuzzyray@gentoo.org>2010-01-06 15:54:37 +0000
commit2212da8d45f122c17fce56ed0c1bc57d4387f95c (patch)
tree125b3a08ba1e9e84902ee5dfd3b24bdb78d304c2 /DEVELOPING
parenta77e5086c73265171363b1389c61c6ee8c4ac520 (diff)
downloadgentoolkit-2212da8d45f122c17fce56ed0c1bc57d4387f95c.tar.gz
Merge genscripts revision 144, contains fixes for Bug 299260
svn path=/trunk/gentoolkit/; revision=729
Diffstat (limited to 'DEVELOPING')
-rw-r--r--DEVELOPING19
1 files changed, 7 insertions, 12 deletions
diff --git a/DEVELOPING b/DEVELOPING
index 0a6c309..e8b7ab3 100644
--- a/DEVELOPING
+++ b/DEVELOPING
@@ -1,5 +1,5 @@
Python Code Guidelines
----------------
+----------------------
These are a few guidelines to stick to when modifying or adding code to
Gentoolkit. These guidelines do not apply to pym/gentoolkit/test/*.
@@ -33,7 +33,7 @@ Line-Wrapping
...
)
-- Max. line length is strictly 80 characters with a tab length of 4 characters.
+- Preferred line length is 80 characters with a tab length of 4 characters.
- "The preferred way of wrapping long lines is by using Python's implied line
continuation inside parentheses, brackets and braces" rather than using '\'
(PEP 8).
@@ -47,12 +47,12 @@ Line-Wrapping
self._descriptions = \
[e.text for e in self._xml_tree.findall("longdescription")]
- BETTER:
+ OK:
self._descriptions = [
e.text for e in self._xml_tree.findall("longdescription")
]
- BEST: (easiest to read and test)
+ OK: (easiest to read and test)
long_descriptions = self._xml_tree.findall("longdescription")
self._descriptions = [e.text for e in long_descriptions]
@@ -153,14 +153,9 @@ something tricky about them, though.
Other concerns:
---------------
- Choose names which are full, clear words (not necessary in small loops).
-- It is NEVER necessary to prefix names with "my". Consider:
- class FooThinger(object):
- def __init__(self, foo):
- self.myfoo = foo
-
- Just use FooThinger.foo or FooThinger.orig_foo; "my"foo tells us nothing.
+- It is NEVER necessary to prefix names with "my". It adds no useful
+ information.
- Comment and document in simple, unambiguous and non-repetitive English.
- When adding a TODO, FIXME or XXX comment, please date it and add your name so
that other devs know who to ask about the proposed change.
-- Be careful of spelling. DO spell check your source code and be professional
- when writing comments.
+- Be careful of spelling.