From 66ff38b27402e0412a842bc00788887d24da56b4 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 11 Nov 2012 20:41:55 -0500 Subject: [PATCH] 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. --- pym/gentoolkit/keyword.py | 1 + 1 file changed, 1 insertion(+) 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) -- 2.26.2