[Yum-devel] Re: [yum-cvs] yum/yum packageSack.py, 1.6, 1.7 packages.py, 1.51, 1.52
seth vidal
skvidal at linux.duke.edu
Tue Aug 22 18:20:26 UTC 2006
On Tue, 2006-08-22 at 14:16 -0400, Luke Macken wrote:
> On Tue, Aug 22, 2006 at 01:28:04PM -0400, Jeremy Katz wrote:
> > Style question only...
> >
> > On Tue, 2006-08-22 at 00:04 -0400, Seth Vidal wrote:
> > > + def __lt__(self, other):
> > > + val = False
> > > + rc = comparePoEVR(self, other)
> > > + if rc < 0:
> > > + val = True
> > > +
> > > + return val
> >
> > Does it make more sense to do
> > def __lt__(self, other):
> > if comparePoEVR(self, other) < 0:
> > return True
> > return False
> >
> > instead? It's more compact and so a little easier for me to read, but I
> > doubt it has any real effect beyond aesthetics.
>
> or, compacting things a bit more :)
>
> def __lt__(self, other):
> return comparePoEVR(self, other) < 0
>
okay - I think that takes it a bit far.
That feels like the code I'd see trying to get everything into one line
of perl.
-sv
More information about the Yum-devel
mailing list