On Mon, Jul 21, 2008 at 10:35:08PM -0700, Brock Pytlik wrote: > Not surprisingly, this was harder to pull off than I had hoped for, or I've > got my stupid hat on tonight. I'd like to remove the call to "isinstance" > in search_dict. I worked on a version which involved subclassing dict and > implementing an iterator which called back into the attribute class so that > a.search_return (a replacement for a.attrs.get(a.key_attr)) would be update > with each iteration. I'm not sure that's the right way to do it either, but > it seemed like an interesting path to try. Unfortunately, I couldn't quite > get the iterator to work correctly. I've saved that code in case someone > thinks that is the right way to do things.
I don't see the connection between removing the isinstance() call and subclassing dict, but I'd be glad to take a look at the change you made and see if I can help get it working. > And here's the new expected output: > "com.sun.service.bug_ids set 4851433 > pkg:/[EMAIL PROTECTED]" > "com.sun.service.incorporated_changes set 6556919 > pkg:/[EMAIL PROTECTED]", > "com.sun.service.bug_ids set 6556919 > pkg:/[EMAIL PROTECTED]" > "com.sun.service.random_test set 42 > pkg:/[EMAIL PROTECTED]" > "com.sun.service.keywords set separator > pkg:/[EMAIL PROTECTED]" > "fmri set fmri > pkg:/[EMAIL PROTECTED]" > "description set gmake > pkg:/[EMAIL PROTECTED]" Well, aside from the line wrapping, I think that looks better. We'll have to figure out a display method for the cli, but that can wait for now. Thanks, Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
