On Fri, 2010-05-07 at 18:41 +0200, Tim Lauridsen wrote: > > + packages = property(fget=lambda self: > self._getProbPkgs()) > > Any reason for we use the syntax all over yum, instead of > > @property > def packages(self): > return self._getProbPkgs() > > much more readable in my world :)
Seth said it was due to problems in inherited classes, and I just copy it to stay the same, but I just tried: class old1: def __init__(self, abcd): self.abcd = abcd @property def xyz(self): return self.abcd class old2(old1): @property def xyz(self): return "blah" print old1("abcd").xyz print old2("abcd").xyz ...and it prints "blah" for old2 (dito. for new style classes). So maybe I'm mis-remembering ... or maybe Seth's so old it's a problem from pre 2.0 python ;) _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel