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 1Qssqd-0000lR-Gk for garchives@archives.gentoo.org; Mon, 15 Aug 2011 08:48:40 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7014321C0A0; Mon, 15 Aug 2011 08:48:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3CDD521C07B for ; Mon, 15 Aug 2011 08:48:30 +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 B936F1B4087 for ; Mon, 15 Aug 2011 08:48:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 969A98004B for ; Mon, 15 Aug 2011 08:48:28 +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: <7a1fafa956d90fd27a89fb295408548008e442a5.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: 7a1fafa956d90fd27a89fb295408548008e442a5 Date: Mon, 15 Aug 2011 08:48:28 +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: 8fe0e7db3f83e243c03cd7ce94e473e8 commit: 7a1fafa956d90fd27a89fb295408548008e442a5 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Mon Aug 15 08:49:34 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Mon Aug 15 08:49:34 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoopm.git;= a=3Dcommit;h=3D7a1fafa9 Drop StringCompat2. --- gentoopm/util.py | 44 -------------------------------------------- 1 files changed, 0 insertions(+), 44 deletions(-) diff --git a/gentoopm/util.py b/gentoopm/util.py index ddd9cc1..7779a82 100644 --- a/gentoopm/util.py +++ b/gentoopm/util.py @@ -77,50 +77,6 @@ class StringCompat(str): def __repr__(self): return '%s(%s)' % (self.__class__.__name__, repr(str(self))) =20 -class StringCompat2(StringifiedComparisons): - """ - A helper class providing objects with compatibility string functions, - working on stringified form of objects. In other words, it lets you use - objects like strings. - """ - - def __hasattr__(self, k): - return hasattr(str, k) - - def __getattr__(self, k): - if not self.__hasattr__(k): - raise AttributeError(k) - return getattr(str(self), k) - - # other useful special methods - def __add__(self, other): - return str(self) + other - - def __contains__(self, h): - # XXX: might be useful to override this - return h in str(self) - - def __format__(self, spec): - return format(str(self), spec) - - def __getitem__(self, k): - return str(self)[k] - - def __len__(self): - return len(str(self)) - - def __mul__(self, other): - return str(self) * other - - def __rmod__(self, other): - return other % str(self) - - def __rmul__(self, other): - return other * str(self) - - def __repr__(self): - return '%s(%s)' % (self.__class__.__name__, repr(str(self))) - class _SpaceSepIter(object): def __getitem__(self, k): if isinstance(k, str):