Am 18.01.2014 00:00, schrieb Tom Wijsman:
> On Fri, 17 Jan 2014 09:35:58 +0100
> Sebastian Luther <sebastianlut...@gmx.de> wrote:
> 
>> The "if entry not in system_set_atoms" line. You're using __contains__
>> there (with the 'in'). You don't use the additional magic provided by
>> PackageSet (which is a super class of PackagesSystemSet).
> 
> This is __contains__, which does what I want as far as I can see:
> http://dev.gentoo.org/~zmedico/portage/doc/api/portage._sets.base-pysrc.html#PackageSet.__contains__
> What is there wrong with this?

There's nothing wrong with that. It's just that the builtin set type
supports that too.

> 
> As for the additional magic, do you mean containsCPV? Looking at it:
> http://dev.gentoo.org/~zmedico/portage/doc/api/portage._sets.base-pysrc.html#PackageSet.containsCPV
> It seems more complex than is necessary, is there a benefit to this?

I thought more about iterAtomsForPackage, which is used in lots of
places in the resolver.

The comment was about the fact that you're using a more complicated
selfmade class instead of a builtin type, even if the builtin type would
suffice. The comment made more sense when I was still suggesting to not
use PackageSystemSet at all.

Reply via email to