[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ANNOUNCE: python-apt

On Mon, 14 Feb 2000, Daniel Burrows wrote:

>  to see state.installed, and so on.  But I don't think there's any reason not
> to merge these two structures so you can directly access, say,
> Cache.Pkgs['dpkg'].mode

Well, someday there may be a third structure ... Unless there is a way to
add new ones in future easially it is probably best to keep them
more seperate.
> operation.  I could make them into sequences (as you suggested with the
> version list), but this has the drawback that accessing an arbitrary member

Make a member for everything that can return lists of iterators, even
though it is horribly inefficient, it is the Python Way. So you could do 

for i in Cache.Packages():

and for i in Pkg.Versions();

Remember, noboy is going to be using python because it is efficient, they
want easy to understand :> Having the native iterators might be useful,


Reply to: