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 1R1KUU-0001oi-9t for garchives@archives.gentoo.org; Wed, 07 Sep 2011 15:56:42 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 76DA521C085; Wed, 7 Sep 2011 15:56:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 440E621C085 for ; Wed, 7 Sep 2011 15:56:34 +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 C41A51B401D for ; Wed, 7 Sep 2011 15:56:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BE82380042 for ; Wed, 7 Sep 2011 15:56:32 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/cache/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/cache/volatile.py X-VCS-Directories: pym/portage/cache/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f55f1714c7e2855ca4cbb45f9d8ae6cee126af17 Date: Wed, 7 Sep 2011 15:56:32 +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: cc8e125979bf0e74de4e6cdfe9c5c419 commit: f55f1714c7e2855ca4cbb45f9d8ae6cee126af17 Author: Zac Medico gentoo org> AuthorDate: Wed Sep 7 15:56:15 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Sep 7 15:56:15 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Df55f1714 cache/volatile: fix __iter__ and __contains__ Special methods can't be assigned in the constructor. --- pym/portage/cache/volatile.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pym/portage/cache/volatile.py b/pym/portage/cache/volatile.p= y index 0bf6bab..18049dd 100644 --- a/pym/portage/cache/volatile.py +++ b/pym/portage/cache/volatile.py @@ -14,12 +14,16 @@ class database(template.database): config.pop("perms", None) super(database, self).__init__(*args, **config) self._data =3D {} - self.__iter__ =3D self._data.__iter__ self._delitem =3D self._data.__delitem__ - self.__contains__ =3D self._data.__contains__ =20 def _setitem(self, name, values): self._data[name] =3D copy.deepcopy(values) =20 def _getitem(self, cpv): return copy.deepcopy(self._data[cpv]) + + def __iter__(self): + return iter(self._data) + + def __contains__(self, key): + return key in self._data