From 70e99e5c8093a171a4ac3797cdf570230ffba66e Mon Sep 17 00:00:00 2001 From: Alec Warner Date: Sun, 22 Jul 2007 19:22:16 +0000 Subject: Add notes about import statements (clarity) and fix spelling error in release-notes svn path=/main/trunk/; revision=7356 --- DEVELOPING | 37 +++++++++++++++++++++++++++++++++++++ RELEASE-NOTES | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/DEVELOPING b/DEVELOPING index 01eb9bd4..725f1ae1 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 diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f6989a14..ff3370ef 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -16,7 +16,7 @@ portage-2.2 used in ACCEPT_KEYWORDS. For packages that don't specify any other KEYWORDS you can use the new ** token as documented in portage(5) to disable KEYWORDS filtering completely. -* Portage now warns if a ebild repository does not have a name, as several new +* Portage now warns if an ebuild repository does not have a name, as several new features in 2.2 make use of or require named repositories. The repository name is stored in profiles/repo_name in each repository. -- cgit v1.2.3