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 78ED81381F3 for ; Tue, 13 Nov 2012 20:43:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1718A21C05E; 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 39AEC21C056 for ; Tue, 13 Nov 2012 20:41:08 +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 AC2F533DA92 for ; Tue, 13 Nov 2012 20:41:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D4233E5456 for ; Tue, 13 Nov 2012 20:40:59 +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: <1352688857.6c751ebd67a981557e5bc9657efef2e6f5f4614d.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/cpv.py X-VCS-Directories: pym/gentoolkit/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: 6c751ebd67a981557e5bc9657efef2e6f5f4614d X-VCS-Branch: gentoolkit Date: Tue, 13 Nov 2012 20:40:59 +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: ac0610a6-bd3d-4062-a930-4258360952b5 X-Archives-Hash: 8b5aae8fc9e7ab77db6e9e68b786c5a0 commit: 6c751ebd67a981557e5bc9657efef2e6f5f4614d Author: W. Trevor King tremily us> AuthorDate: Mon Nov 12 02:54:17 2012 +0000 Commit: Paul Varner gentoo org> CommitDate: Mon Nov 12 02:54:17 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=6c751ebd cpv: define package_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/cpv.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/pym/gentoolkit/cpv.py b/pym/gentoolkit/cpv.py index cda68d7..9c72431 100644 --- a/pym/gentoolkit/cpv.py +++ b/pym/gentoolkit/cpv.py @@ -178,6 +178,7 @@ def compare_strs(pkg1, pkg2): as: package_list.sort(cpv.compare_strs) An alternative is to use the CPV descriptor from gentoolkit.cpv: + >>> package_list = ['sys-apps/portage-9999', 'media-video/ffmpeg-9999'] >>> cpvs = sorted(CPV(x) for x in package_list) @see: >>> help(cmp)