Re: ts.check() and ways of getting unresolved dependencies from a ts
Paul Nasrat <pauln-xGvoirzvwgBWk0Htik3J/[email protected]> Mon, 11 Oct 2004 16:20:56 +0000
| Newsgroups | gmane.linux.redhat.rpm.python |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Oct 11, 2004 at 11:21:33AM -0400, Sean Dilda wrote: > On Mon, 2004-10-11 at 11:05, seth vidal wrote: > > > We could also have ts.check() return a list of 'tsproblem' objects. > > > > These objects could have attributes like: > > problem.type - sense > > problem.need - needname/version/whatever > > problem.whatneeds - header object of the package that is > > needed/conflicted, what have you > > > > For the most part, I like this idea. Especially with special objects, > as opposed to just dictionaries (this is for cosmetic as well as > backwards compatibility reasons). I think list of objects is the way to go. > This reminds me of how the output of os.stat() was changed in the core > python libraries. Originally it returned a tuple. Not it returns an > object that acts much like you're describing. But they also made it > backwards-compatible by making the new object indexable in the same way > the tuple was. I suggest following their lead and have it return a list > of these new backwards-compatible objects. That sounds really nice. I'll look into implementation of a pseudotuple. PyStructSequence seems the key - will fiddle. Paul