From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 588F91381F3 for ; Tue, 13 Nov 2012 20:44:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EC28E21C05B; Tue, 13 Nov 2012 20:41:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6B1C721C056 for ; Tue, 13 Nov 2012 20:41:09 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9A6D833D864 for ; Tue, 13 Nov 2012 20:41:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C4352E544D for ; Tue, 13 Nov 2012 20:40:58 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1352684515.66ff38b27402e0412a842bc00788887d24da56b4.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/keyword.py X-VCS-Directories: pym/gentoolkit/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: 66ff38b27402e0412a842bc00788887d24da56b4 X-VCS-Branch: gentoolkit Date: Tue, 13 Nov 2012 20:40:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 92d45bd5-14d2-41e0-8e8f-274438b8eb2e X-Archives-Hash: 6f397accf4a8eb34214db185112ca26e commit: 66ff38b27402e0412a842bc00788887d24da56b4 Author: W. Trevor King tremily us> AuthorDate: Mon Nov 12 01:41:55 2012 +0000 Commit: Paul Varner gentoo org> CommitDate: Mon Nov 12 01:41:55 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=66ff38b2 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 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)