From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qk2E1-0006pZ-5N for garchives@archives.gentoo.org; Thu, 21 Jul 2011 23:00:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1867921C141; Thu, 21 Jul 2011 23:00:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id DF99F21C141 for ; Thu, 21 Jul 2011 23:00:04 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 407931B4013 for ; Thu, 21 Jul 2011 23:00:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 79B1F8003F for ; Thu, 21 Jul 2011 23:00:03 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <00f6b6888a61cee94ac7b30baa9a93f106c29585.mgorny@gentoo> Subject: [gentoo-commits] proj/gentoopm:master commit in: gentoopm/ X-VCS-Repository: proj/gentoopm X-VCS-Files: gentoopm/util.py X-VCS-Directories: gentoopm/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 00f6b6888a61cee94ac7b30baa9a93f106c29585 Date: Thu, 21 Jul 2011 23:00:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: ecaed3b8868af43950d7109502bd5fb9 commit: 00f6b6888a61cee94ac7b30baa9a93f106c29585 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Thu Jul 21 21:54:40 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Thu Jul 21 21:54:40 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoopm.git;= a=3Dcommit;h=3D00f6b688 Don't use special __ne__ in StringifiedComparisons. --- gentoopm/util.py | 21 +++++++++------------ 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/gentoopm/util.py b/gentoopm/util.py index 0475812..17a8d81 100644 --- a/gentoopm/util.py +++ b/gentoopm/util.py @@ -22,7 +22,15 @@ class ABCObject(object): __metaclass__ =3D ABCMeta ''') =20 -class StringifiedComparisons(object): +class FillMissingNotEqual(object): + """ + A base class filling '!=3D' using '=3D=3D'. + """ + + def __ne__(self, other): + return not self =3D=3D other + +class StringifiedComparisons(FillMissingNotEqual): """ A base class with '=3D=3D', '!=3D' and hashing methods set to use the o= bject stringification. @@ -34,17 +42,6 @@ class StringifiedComparisons(object): def __eq__(self, other): return str(self) =3D=3D str(other) =20 - def __ne__(self, other): - return str(self) !=3D str(other) - -class FillMissingNotEqual(object): - """ - A base class filling '!=3D' using '=3D=3D'. - """ - - def __ne__(self, other): - return not self =3D=3D other - class FillMissingComparisons(FillMissingNotEqual): """ A base class filling '!=3D', '>', '<=3D' and '>=3D' comparators with '<= ' and