Brock Pytlik wrote: > >>> - line 133: you end up with "" instead of None for pkg_name, > >>> action_type, > >>> and key if colons were in the query but no values were specified for > >>> the fields, right? So why bother setting them to None earlier? > >>Are you asking why not set them to "" or why set them period? > >>Assuming it's the former, I don't think there's a good reason, at > >>least not that I can think of at this point. I can change it, and > >>change other places in the code not to check for None there as > >>equivalent to "" (if I do that). > >I think it's more that there's little point in setting them at all. Well, > >key at least; pkg_name and action_type I guess need to be set. > > > Well, if you're returning the 4 tuple, all three variables need to be > in scope, so they need to be set with some value. Sorry if I'm being > dense here.
You're not, and I was. It's only key which doesn't need to be set to None, because it's unconditionally set in the only scope in which it's used. The others can probably move into that clause of the if statement. > Well, logically, they're identical (by which I mean the exact same set of > results should appear from both). So, I thought it made sense to do the > small optimization of combining them when possible to make things go > faster :) Makes sense. Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
