Luiz Capitulino <lcapitul...@redhat.com> writes: > On Mon, 18 Jan 2010 18:16:21 +0100 > Markus Armbruster <arm...@redhat.com> wrote: [...] >> > +/** >> > + * do_pci_info(): PCI buses and devices information >> > + * >> > + * The returned QObject is a QList of all buses. Each bus is >> > + * represented by a QDict, which has a key with a QList of all >> > + * PCI devices attached to it. Each device is represented by >> > + * a QDict. >> > + * >> > + * The bus QDict contains the following: >> > + * >> > + * - "bus": bus number >> > + * - "devices": a QList of QDicts, each QDict represents a PCI >> > + * device >> > + * >> > + * The PCI device QDict contains the following: >> > + * >> > + * - "bus": bus number >> >> This is redundant, because a device QDict is always contained in a bus >> QDict, which has the bus number. > > Turns out I find this redundancy convenient for clients, because if > you pass the device dict down to a function you have the bus number > there if you need it (otherwise you'd need to pass the bus number > too). > > I'm writing a shell in Python and found this convenient, is it that > bad?
It's not bad, it's redundant :) A little convenient redundancy is okay. I just don't want accidental redundancy. If you keep it, I'd suggest document that it's identical to the parent's bus member. [...]