summaryrefslogtreecommitdiffstats
path: root/DEVELOPING
diff options
context:
space:
mode:
Diffstat (limited to 'DEVELOPING')
-rw-r--r--DEVELOPING37
1 files changed, 37 insertions, 0 deletions
diff --git a/DEVELOPING b/DEVELOPING
index 01eb9bd42..725f1ae1e 100644
--- a/DEVELOPING
+++ b/DEVELOPING
@@ -65,3 +65,40 @@ except KeyError:
dict[foo] = default_value
The get call is nicer (compact) and faster (try,except are slow).
+
+Imports
+-------
+
+Import things one per line
+
+YES:
+ import os
+ import time
+ import sys
+
+NO:
+ import os,sys,time
+
+When importing from a module, you may import more than 1 thing at a time.
+
+YES:
+ from portage.module import foo, bar, baz
+
+Multiline imports are ok (for now :))
+
+Try to group system and package imports separately.
+
+YES:
+ import os
+ import sys
+ import time
+
+ from portage.locks import lockfile
+ from portage.versions import vercmp
+
+NO:
+ import os
+ import portage
+ import portage.util
+ import time
+ import sys