On Fri, Dec 21, 2007 at 04:29:53PM -0800, [EMAIL PROTECTED] wrote:
> > [ Re: 229ff ]
> >
> > I'm suggesting that you needn't do all the set arithmetic, and that you
> > just write known_prefixes into the attribute directly, since it ends up
> > doing exactly the same work with less and more readable code.
>
> Except that we don't want to remove prefixes in the case I gave below
> running old/new/old clients. I can try to code this up without sets, if
> you'd like.
Ah, of course. No, sets are fine, though I'd ditch the for loop:
self.attrs["prefix"] = "".join(pfx_set)
> I'm a little lost, since I would have assumed that we would have written
> code to modify what we're looking for once prefix Z was introduced. I'm
> not adding new prefixes yet, so it seemed a bit overkill to modify this
> past explicitly ignoring unknown prefixes.
>
> I assumed that since the only prefixes that we know about in this case
> are C and V and we'll ignore all others, it's still sane to keep this
> code. Do you disagree?
I'm coming around. I still think that the code ought to peel off one field
at a time from the left, making a decision after each field about what
needs to happen next, but I think you're making the right checks in the
end.
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss