aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-03-05 22:17:01 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-03-05 22:17:01 +0000
commit1e275d08072ba34aa74157876d4b9fcc452acfd4 (patch)
treec4612b153f682d5b40081c5843533a53e79a7a8e
parent4cae1268de8d90637a11732fb4804fd79cb8e6d0 (diff)
downloadenigma2-1e275d08072ba34aa74157876d4b9fcc452acfd4.tar.gz
enigma2-1e275d08072ba34aa74157876d4b9fcc452acfd4.zip
note about import *
-rw-r--r--doc/RULES10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/RULES b/doc/RULES
index 9170eef0..55aa4bf4 100644
--- a/doc/RULES
+++ b/doc/RULES
@@ -112,7 +112,15 @@ not nothing. Going trough all prints to find the offending one is definitely
no fun. Something like "print 'obj', obj" is fine. Something like "print
'mySpecialPlugin actionmap is', actionMap" is even better.
-6.-99.) Threads are bad.
+6.) usage of 'import'
+
+Please avoid 'import *'.
+Use "from foo import bar" only if bar is clearly identifiable to belong to
+foo (e.g.: it's ok to "from Screens.MessageBox import MessageBox", but it's
+not ok to do "from os import path". Use "import os.path", then os.path.fnc.
+Of course "from os.path import *" is even worse.)
+
+7.-99.) Threads are bad.
(Unless they are worker threads. And sleep()ing is definitely not working.
So if you every having a thread which sleeps, you did something wrong. There