summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2012-11-11 20:41:55 -0500
committerW. Trevor King <wking@tremily.us>2012-11-11 20:41:55 -0500
commit66ff38b27402e0412a842bc00788887d24da56b4 (patch)
tree8af02d8f0d7f08fd3b41f53ea809222f7709fb9c /pym
parent88ac4e9030ab5827d1ab4d01ee6c0aff85184d28 (diff)
downloadgentoolkit-66ff38b27402e0412a842bc00788887d24da56b4.tar.gz
keyword: define keyword_list in compare_strs doctest
This is not much of a doctest, since we aren't using compare_strs() anywhere, but at least it doesn't error out. Note that comparisons have been reworked in Python 3 where cmp() has been removed.
Diffstat (limited to 'pym')
-rw-r--r--pym/gentoolkit/keyword.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pym/gentoolkit/keyword.py b/pym/gentoolkit/keyword.py
index a234116..0f3807c 100644
--- a/pym/gentoolkit/keyword.py
+++ b/pym/gentoolkit/keyword.py
@@ -75,6 +75,7 @@ def compare_strs(kw1, kw2):
as: keyword_list.sort(keyword.compare_strs)
An alternative is to use the Keyword descriptor directly:
+ >>> keyword_list = ['~x86', '~amd64', 'x86']
>>> kwds = sorted(Keyword(x) for x in keyword_list)
@see: >>> help(cmp)