I need the mapping subscript syntax for sub-identifiers (eg
a.iso.org.dod.internet.mgmt['mib-2'].interfaces.ifNumber[0].get()
(to pick a pathological example)) and it seems I need the sequence
'item' call to do Jack's suggested
for i in s.interfaces.ifTable.ifEntry:
do_some_tabular_magic()
syntax.
>From fiddling a bit, it appears the way a 'for' loop is done is that
the seq_item function is called with successively higher numbers
until it returns 0. But wont this also then mean on a call, say, of
foo.ifNumber[0], that the sequence_item function might get called?
Testing it shows that the mapping subscript function always gets called
in preference to the sequence item function, but I need to be sure that
this will remain the case.
Thanks,
Confused In Melbourne.