Re: Re: ts.check() and ways of getting unresolved dependencies from a ts
Paul Nasrat <pauln-xGvoirzvwgBWk0Htik3J/[email protected]> Mon, 11 Oct 2004 16:41:18 +0000
| Newsgroups | gmane.linux.redhat.rpm.python |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Oct 11, 2004 at 12:38:33PM -0400, Tres Seaver wrote: > Paul Nasrat wrote: > >On Mon, Oct 11, 2004 at 11:21:33AM -0400, Sean Dilda wrote: > >>On Mon, 2004-10-11 at 11:05, seth vidal wrote: > >>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. > > You could just implement '__getitem__' in a Python class; this is all > Python expects for sequence objects. True, wrapping over rpmmodule is high on my hit list. It may be quicker to implement within rpmts for now using PyStructSequence and then when we have it wrapped do it in a python class. Paul